Class OneVsRestClassificationExample
- java.lang.Object
-
- org.apache.ignite.examples.ml.multiclass.OneVsRestClassificationExample
-
public class OneVsRestClassificationExample extends java.lang.ObjectRun One-vs-Rest multi-class classification trainer (OneVsRestTrainer) parametrized by binary SVM classifier (SVMLinearClassificationTrainer) over distributed dataset to build two models: one with min-max scaling and one without min-max scaling.Code in this example launches Ignite grid and fills the cache with test data points (preprocessed Glass dataset).
After that it trains two One-vs-Rest multi-class models based on the specified data - one model is with min-max scaling and one without min-max scaling.
Finally, this example loops over the test set of data points, applies the trained models to predict what cluster does this point belong to, compares prediction to expected outcome (ground truth), and builds confusion matrix.
You can change the test data used in this example and re-run it to explore this algorithm further.
NOTE: the smallest 3rd class could not be classified via linear SVM here.
-
-
Constructor Summary
Constructors Constructor Description OneVsRestClassificationExample()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static voidmain(java.lang.String[] args)Run example.
-