You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This resulted in EmptyPrediction for all my inputs.
When I debugged, I found that this is because the integer type target field is not supported in library implementation.
Following is the place where it breaks.
pmmlModel.scala method extractTarget
private[api] def extractTarget(evaluationResult: java.util.Map[FieldName, _]): Double = {
val targets = extractTargetFields(evaluationResult)
targets.headOption.flatMap {
case (_, target) => extractTargetValue(target)
} getOrElse (throw new JPMMLExtractionException("Target value is null."))
pipeline.scala method extractTargetValue
@throws(classOf[ClassCastException])
protected def extractTargetValue(target: Any): Option[Double] = target match {
case s: String => Some(s.toDouble)
case d: Double => Some(d)
case _ => None
}
when I change the target value type to be double in the pmml model I get expected predictions.
Can you check this?
Regards,
Harish.
The text was updated successfully, but these errors were encountered:
yes, we should support also integers and additional output types. For instance, we can add also Float and Long. @francescofrontera can provide a solution within one week. If you want to provide a solution before you're more than welcome!
Hi,
The model I used to test the flink-jpmml library had the target value as Integer type.
Following is the target field from the PMML model I used.
This resulted in
EmptyPrediction
for all my inputs.When I debugged, I found that this is because the integer type target field is not supported in library implementation.
Following is the place where it breaks.
pmmlModel.scala
method extractTargetpipeline.scala
methodextractTargetValue
when I change the target value type to be double in the pmml model I get expected predictions.
Can you check this?
Regards,
Harish.
The text was updated successfully, but these errors were encountered: