public final class Voter<A extends Classifier> extends AbstractClassifier
| Modifier and Type | Class and Description |
|---|---|
static class |
Voter.CombiningType |
static class |
Voter.SelectionType |
| Modifier and Type | Method and Description |
|---|---|
static <K extends Classifier> |
create(int numClassifiers,
Voter.CombiningType type,
ClassifierFactory<K> classifierFactory)
Creates a new voting classificator.
|
static <K extends Classifier> |
fromTrainedModels(List<K> classifier)
Creates a voter from the given trained models for prediction purposes.
|
Classifier[] |
getClassifier() |
Voter<A> |
numThreads(int threads) |
de.jungblut.math.DoubleVector |
predict(de.jungblut.math.DoubleVector features)
Classifies the given features.
|
Voter<A> |
selectionType(Voter.SelectionType type) |
Voter<A> |
setCombiningType(Voter.CombiningType type) |
void |
train(de.jungblut.math.DoubleVector[] features,
de.jungblut.math.DoubleVector[] outcome)
Trains this classifier with the given features and the outcome.
|
Voter<A> |
verbose() |
Voter<A> |
verbose(boolean verb) |
trainextractPredictedClass, extractPredictedClass, predictedClass, predictedClass, predictProbabilityclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitasClassifier, extractPredictedClass, extractPredictedClass, predictedClass, predictedClass, predictProbabilitypublic void train(de.jungblut.math.DoubleVector[] features,
de.jungblut.math.DoubleVector[] outcome)
Classifiertrain in interface Classifiertrain in class AbstractClassifieroutcome - 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.public de.jungblut.math.DoubleVector predict(de.jungblut.math.DoubleVector features)
Predictorpublic Classifier[] getClassifier()
public Voter<A> verbose(boolean verb)
public Voter<A> selectionType(Voter.SelectionType type)
public Voter<A> numThreads(int threads)
public Voter<A> setCombiningType(Voter.CombiningType type)
public static <K extends Classifier> Voter<K> create(int numClassifiers, Voter.CombiningType type, ClassifierFactory<K> classifierFactory)
numClassifiers - the number of base classifiers to use.type - the combining type to use.classifierFactory - the classifier factory to create base classifiers.public static <K extends Classifier> Voter<K> fromTrainedModels(List<K> classifier)
classifier - Copyright © 2016. All rights reserved.