Comments (3)
Apache Spark includes two random forest implementations:
- Class
RandomForest
in MLlib: https://spark.apache.org/docs/2.2.0/api/java/org/apache/spark/mllib/tree/RandomForest.html - Classes
RandomForestClassifier
andRandomForestRegressor
in ML: https://spark.apache.org/docs/2.2.0/api/java/org/apache/spark/ml/classification/RandomForestClassifier.html and https://spark.apache.org/docs/2.2.0/api/java/org/apache/spark/ml/regression/RandomForestRegressor.html
As the name suggests, the JPMML-SparkML library is targeting the "ML" implementation. All JPMML-SparkML converters have full coverage with integration tests, and they are able to reproduce Apache Spark ML predictions within 1e-15 error margin.
If you are looking to export "MLlib" implemenation, then you should simply use Apache Spark's built-in PMMLExportable
trait.
from jpmml-sparkml.
I am only referring to the DataFrame based models in org.apache.spark.ml that JPMML-SparkML is designed for. Why does the SparkML source say it's majority vote, but average seems to work?
from jpmml-sparkml.
Why does the SparkML source say it's majority vote, but average seems to work?
Maybe you're being misled by the "votes" variable name.
The expression votes(i) += classCounts(i) / classCounts.sum
is performing the summation of tree probability distributions; the sum of probability distribution is finally divided by the number of trees. This can/should be interpreted as the "average" of probability distributions.
In that sense, the PMML language is capturing the intent of the algorithm better than Scala code.
from jpmml-sparkml.
Related Issues (20)
- MultilayerPerceptronClassificationModel IllegalArgumentException("Expected 3 target categories, got 2 target categories"); HOT 1
- How to import the training data schema in libsvm format HOT 15
- Wrong code path for multinomial logistic regression model HOT 1
- Probability column not being found when using it in a stacked model HOT 6
- StringIndexerModelConverter gives java.lang.IllegalArgumentException HOT 4
- java.lang.ClassNotFoundException: org.jpmml.converter.BaseNFeature HOT 5
- Support for custom Java-backed models (eg. factorization machine) HOT 1
- Why One-Hot-Encoding is not visible in PMML? HOT 1
- py4j.protocol.Py4JError: org.jpmml.sparkml.PMMLBuilder does not exist in the JVM HOT 1
- Error with LightGBMClassificationModel HOT 5
- Support for `XGBoostRegressor.missing` property HOT 6
- Troubleshooting XGBoost model performance HOT 17
- Support for Apache Spark 3.3.X HOT 2
- 2.x jars missing from Maven Central HOT 3
- Support for `replace` SQL function HOT 6
- Exception in thread "main" java.lang.NoClassDefFoundError: com/microsoft/azure/synapse/ml/codegen/Wrappable
- java.lang.NoSuchMethodError: org.jpmml.sparkml.SparkMLEncoder.getDataField HOT 1
- Databricks Install HOT 1
- Version v4 is not supported HOT 2
- Cannot convert (partially-) unfitted pipelines HOT 22
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from jpmml-sparkml.