jsat.classifiers
Interface Classifier
-
- All Superinterfaces:
- java.lang.Cloneable, java.io.Serializable
- All Known Subinterfaces:
- BinaryScoreClassifier, UpdateableClassifier, WarmClassifier
- All Known Implementing Classes:
- AdaBoostM1, ALMA2, ALMA2K, AMM, AODE, ArcX4, AROW, BackPropagationNet, Bagging, BaseUpdateableClassifier, BBR, BestClassDistribution, BinaryCalibration, BOGD, BorderlineSMOTE, ConditionalProbabilityTable, CPM, CSKLR, CSKLRBatch, DANN, DataModelPipeline, DCD, DCDs, DCSVM, DDAG, DecisionStump, DecisionTree, DiscreteBayesNetwork, DReDNetSimple, DUOL, EmphasisBoost, ERTrees, ExtraTree, Forgetron, GridSearch, ID3, IsotonicCalibration, K2NetworkLearner, KernelSGD, LinearBatch, LinearL1SCD, LinearSGD, LogisticRegressionDCD, LogitBoost, LogitBoostPL, LSSVM, LVQ, LVQLLC, LWL, MajorityVote, ModelSearch, ModestAdaBoost, MultinomialNaiveBayes, MultivariateNormals, NaiveBayes, NaiveBayesUpdateable, NearestNeighbour, NewGLMNET, NHERD, ODE, OneVSAll, OneVSOne, OnlineAMM, OSKL, PassiveAggressive, Pegasos, PegasosK, Perceptron, PlattCalibration, PlattSMO, PriorClassifier, Projectron, RandomDecisionTree, RandomForest, RandomSearch, RBFNet, RegressorToClassifier, Rocchio, ROMMA, SAMME, SBP, SCD, SCW, SDCA, SMIDAS, SMOTE, SOM, SPA, Stacking, STGD, StochasticMultinomialLogisticRegression, StochasticSTLinearL1, SVMnoBias, UpdatableStacking, Wagging, WaggingNormal
public interface Classifier extends java.lang.Cloneable, java.io.SerializableA Classifier is used to predict the target class of new unseen data points.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method and Description CategoricalResultsclassify(DataPoint data)Performs classification on the given data point.Classifierclone()booleansupportsWeightedData()Indicates whether the model knows how to train using weighted data points.default voidtrain(ClassificationDataSet dataSet)Trains the classifier and constructs a model for classification using the given data set.voidtrain(ClassificationDataSet dataSet, boolean parallel)Trains the classifier and constructs a model for classification using the given data set.
-
-
-
Method Detail
-
classify
CategoricalResults classify(DataPoint data)
Performs classification on the given data point.- Parameters:
data- the data point to classify- Returns:
- the results of the classification.
- Throws:
UntrainedModelException- if the method is called before the model has been trainedModelMismatchException- if the given data point is incompatible with the model
-
train
void train(ClassificationDataSet dataSet, boolean parallel)
Trains the classifier and constructs a model for classification using the given data set. If the training method knows how, it will used the threadPool to conduct training in parallel. This method will block until the training has completed.- Parameters:
dataSet- the data set to train onparallel-trueif multiple threads should be used to train the model.falseif it should be done in a single threaded manner.- Throws:
FailedToFitException- if the model is unable to be constructed for some reason
-
train
default void train(ClassificationDataSet dataSet)
Trains the classifier and constructs a model for classification using the given data set.- Parameters:
dataSet- the data set to train on- Throws:
FailedToFitException- if the model is unable to be constructed for some reason
-
supportsWeightedData
boolean supportsWeightedData()
Indicates whether the model knows how to train using weighted data points. If it does, the model will train assuming the weights. The values returned by this method may change depending on the parameters set for the model.- Returns:
- true if the model supports weighted data, false otherwise
-
clone
Classifier clone()
-
-
DataMelt 3.0 © DataMelt by jWork.ORG