Package de.jungblut.classification
Class AbstractClassifier
- java.lang.Object
-
- de.jungblut.classification.AbstractPredictor
-
- de.jungblut.classification.AbstractClassifier
-
- All Implemented Interfaces:
Classifier,Predictor
- Direct Known Subclasses:
AbstractKNearestNeighbours,DecisionTree,HMM,LogisticRegression,MaxEntMarkovModel,MultilayerPerceptron,MultinomialNaiveBayes,RandomForest,Voter
public abstract class AbstractClassifier extends AbstractPredictor implements Classifier
Abstract base class for classifiers.- Author:
- thomas.jungblut
-
-
Constructor Summary
Constructors Constructor Description AbstractClassifier()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidtrain(de.jungblut.math.DoubleVector[] features, de.jungblut.math.DoubleVector[] outcome)Trains this classifier with the given features and the outcome.voidtrain(java.lang.Iterable<de.jungblut.math.DoubleVector> features, java.lang.Iterable<de.jungblut.math.DoubleVector> outcome)Trains this classifier with the given features and the outcome.-
Methods inherited from class de.jungblut.classification.AbstractPredictor
extractPredictedClass, extractPredictedClass, predictedClass, predictedClass, predictProbability
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface de.jungblut.classification.Predictor
asClassifier, extractPredictedClass, extractPredictedClass, predict, predictedClass, predictedClass, predictProbability
-
-
-
-
Method Detail
-
train
public void train(de.jungblut.math.DoubleVector[] features, de.jungblut.math.DoubleVector[] outcome)Description copied from interface:ClassifierTrains this classifier with the given features and the outcome.- Specified by:
trainin interfaceClassifieroutcome- the outcome must have classes labeled as doubles. E.G. in the binary case you have a single element and decide between 0d and 1d. In higher dimensional cases you have each of these single elements mapped to a dimension.
-
train
public void train(java.lang.Iterable<de.jungblut.math.DoubleVector> features, java.lang.Iterable<de.jungblut.math.DoubleVector> outcome)Description copied from interface:ClassifierTrains this classifier with the given features and the outcome. This is the streaming method for training, it takes parallel iterables.- Specified by:
trainin interfaceClassifieroutcome- the outcome must have classes labeled as doubles. E.G. in the binary case you have a single element and decide between 0d and 1d. In higher dimensional cases you have each of these single elements mapped to a dimension.
-
-