# Export PMML that outputs class probabilities

**URL:** <https://forum.knime.com/t/export-pmml-that-outputs-class-probabilities/13244>\
**Category:** KNIME Analytics Platform\
**Created:** [January 22, 2019, 6:47pm UTC](https://forum.knime.com/t/export-pmml-that-outputs-class-probabilities/13244 "2019-01-22T18:47:49Z")\
**Posts on this page:** 1\
**Showing post:** 2

<div class="post-metadata">

**Author:** ![mlauber71](https://forum-cdn.knime.com/user_avatar/forum.knime.com/mlauber71/32/73590_2.png) [@mlauber71](https://forum.knime.com/u/mlauber71)\
**Post date:** [January 22, 2019, 7:11pm UTC](https://forum.knime.com/t/export-pmml-that-outputs-class-probabilities/13244/2 "2019-01-22T19:11:37Z")

</div>

I think it depends on the type of model. Normally you would have to tell the Predictor to add the class probabilities. The generic PMML predictor does not have this function - or it depends on the type of model.

 ![image](https://forum-cdn.knime.com/uploads/default/original/2X/3/327989b0cadc20384c9a922014986d3f53f85085.png)

> [@Looking for options to evaluate a decision tree](https://forum.knime.com/t/looking-for-options-to-evaluate-a-decision-tree/11384/2):
>
> One ‘brutal’ way could be to convert the decision tree rules into SQL and then use the SQL code. Or use the ruleset to make some kind of If then rules. Not very elegant I have to admit. [kn\_example\_decision\_tree.knwf](https://forum-cdn.knime.com/uploads/default/original/2X/1/1132014ad9feb823a8ee8e8d5c9ce19ad8c13ba2.knwf) (510.8 KB)

Nodes that support Probabilities and PMML are:

> **[Decision Tree Learner — NodePit](https://nodepit.com/node/org.knime.base.node.mine.decisiontree2.learner2.DecisionTreeLearnerNodeFactory3)**
>
> Decision tree induction performed in memory.

Additionally the Decision Tree offers the possibility to create a quite readably [ruleset](https://nodepit.com/node/org.knime.base.node.rules.engine.decisiontree.FromDecisionTreeNodeFactory) that you can then use with SQL or another language

> **[Naive Bayes Learner — NodePit](https://nodepit.com/node/org.knime.base.node.mine.bayes.naivebayes.learner3.NaiveBayesLearnerNodeFactory4)**
>
> Creates a naive Bayes model from the given classified data.

> **[RProp MLP Learner — NodePit](https://nodepit.com/node/org.knime.base.node.mine.neural.rprop.RPropNodeFactory2)**
>
> Builds and learns an MLP with resilient backpropagation.

> **[SVM Learner — NodePit](https://nodepit.com/node/org.knime.base.node.mine.svm.learner.SVMLearnerNodeFactory2)**
>
> Trains a support vector machine.

Additionally the

> **[PMML Compiling Predictor — NodePit](https://nodepit.com/node/org.knime.base.pmml.translation.pmmlpredictor.PMMLFastPredictorNodeFactory)**
>
> Generates Java scoring code from a PMML model, compiles it into bytecode and executes it on the given data.

Supports these model types and also has the possibility to add probabilities/scores. But from my experience needs some resources to work

Currently supported PMML models are all those generated by KNIME plus Naive Bayes:

- Regression
- SVM
- MLP
- K-Means Clustering
- Decision Trees
- Naive Bayes
- Rulesets
- Ensembles of the above

---

_[View the full topic](https://forum.knime.com/t/export-pmml-that-outputs-class-probabilities/13244)._
