Package qupath.opencv.ml
Class OpenCVClassifiers
java.lang.Object
qupath.opencv.ml.OpenCVClassifiers
QuPath wrappers for OpenCV classifiers, which are instances of StatModel.
There are two main reasons to use these wrappers rather than StatModel directly:
- Improved API consistency when exchanging between classifiers. For example, some require training data to be in a specified form (labels or one-hot encoding).
- Easier serialization to JSON along with other QuPath objects via
GsonTools.
- Author:
- Pete Bankhead
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classClassifier based onBoost.static classClassifier based onDTrees.static classClusterer based onEM.static classClassifier based onLogisticRegression.static classClassifier based onNormalBayesClassifier.static classWrapper class for aStatModel, which standardizes how training may be performed and parameters can be set.static classClassifier based onRTrees.static classClassifier based onSVM.static classClassifier based onSVMSGD. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptioncreateStatModel(Class<? extends StatModel> cls) Create anOpenCVClassifiers.OpenCVStatModelfor a specific class ofStatModel.wrapStatModel(StatModel statModel) Create anOpenCVClassifiers.OpenCVStatModelby wrapping an existingStatModel.
-
Constructor Details
-
OpenCVClassifiers
public OpenCVClassifiers()
-
-
Method Details
-
createStatModel
Create anOpenCVClassifiers.OpenCVStatModelfor a specific class ofStatModel.- Parameters:
cls-- Returns:
-
wrapStatModel
Create anOpenCVClassifiers.OpenCVStatModelby wrapping an existingStatModel.- Parameters:
statModel-- Returns:
-