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
Hello,
Sometimes in the dataset, target variable is pre-encoded into the 0, 1. But in those sometimes there are other sometimes when those 0 and 1 are encoded in as float. So they are 0.0 and 1.0.
Problem
Now, when we create the PMML for such data the output code is generated like this:
So, when we try to predict with other data with the following sentence:
Dataset<Row> result = pmmlTransformer.transform(DF);
The error is generated like:
Exception in thread "main" org.apache.spark.sql.AnalysisException: No such struct field `probability(0.0)` in income_>50K, probability(0.0), probability(1.0);
...
A Fix
So I tried, manually removing the . from the .pmml file and that worked correctly!
The updated code that worked correctly:
I can understand, that this could be solved from the file where we are generating the PMML but that might not be possible all time. So for the convenience I would ask this community to fix this at the jpmml level.
Thanking you 😄
The text was updated successfully, but these errors were encountered:
Classification Scenario
Context
Hello,
Sometimes in the dataset, target variable is pre-encoded into the 0, 1. But in those sometimes there are other sometimes when those 0 and 1 are encoded in as float. So they are
0.0
and1.0
.Problem
Now, when we create the PMML for such data the output code is generated like this:
So, when we try to predict with other data with the following sentence:
The error is generated like:
A Fix
So I tried, manually removing the
.
from the .pmml file and that worked correctly!The updated code that worked correctly:
I can understand, that this could be solved from the file where we are generating the PMML but that might not be possible all time. So for the convenience I would ask this community to fix this at the
jpmml
level.Thanking you 😄
The text was updated successfully, but these errors were encountered: