Class RandomForestClassificationExample
- java.lang.Object
-
- org.apache.ignite.examples.ml.tree.randomforest.RandomForestClassificationExample
-
public class RandomForestClassificationExample extends java.lang.ObjectExample represents a solution for the task of wine classification based on a Random Forest implementation for multi-classification.Code in this example launches Ignite grid and fills the cache with test data points (based on the Wine recognition dataset).
After that it initializes the
RandomForestClassifierTrainerwith thread pool for multi-thread learning and trains the model based on the specified data using random forest regression algorithm.Finally, this example loops over the test set of data points, compares prediction of the trained model to the expected outcome (ground truth), and evaluates accuracy of the model.
You can change the test data used in this example and re-run it to explore this algorithm further.
-
-
Constructor Summary
Constructors Constructor Description RandomForestClassificationExample()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static voidmain(java.lang.String[] args)Run example.
-