-
Notifications
You must be signed in to change notification settings - Fork 80
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
spark ml decision tree model convert to pmml #93
Comments
Right now you're invoking If you invoke For example, changing the PMMLBuilder pmmlBuilder = ...
PMML pmml = pmmlBuilder.build();
Visitor mvsCustomizer = new AbstractVisitor(){
@Override
public VisitorAction visit(TreeModel treeModel){
treeModel.setMissingValueStrategy(TreeModel.MissingValueStrategy.LAST_PREDICTION);
return super.visit(treeModel);
}
};
mvsCustomizer.applyTo(pmml); |
It's possible to compute record counts for "parent" tree levels by summing the record counts of their "child" tree levels. There's a Visitor API example available in another demo project: |
Leaving this issue open-ish - a reminder that perhaps there's a way to generalize and implement all this functionality in the form of JPMML-SparkML conversion options. |
Thank you so much!!! |
when convert spark ml pipelinemodel to pmml, i want to set missingValueStrategy as lastPrediction and set ScoreDistribution and score in every node(not just leaf node), how can i do this in java?
The following picture is my code and part of pmml.xml result:
The text was updated successfully, but these errors were encountered: