public class UntrainableClassifier extends Object implements Classifier
| Constructor and Description |
|---|
UntrainableClassifier(Predictor predictor) |
| Modifier and Type | Method and Description |
|---|---|
int |
extractPredictedClass(de.jungblut.math.DoubleVector predict)
Given an already done prediction, choose the class.
|
int |
extractPredictedClass(de.jungblut.math.DoubleVector predict,
double threshold)
Given an already done prediction, choose the class with a threshold.
|
de.jungblut.math.DoubleVector |
predict(de.jungblut.math.DoubleVector features)
Classifies the given features.
|
int |
predictedClass(de.jungblut.math.DoubleVector features)
Classifies the given features.
|
int |
predictedClass(de.jungblut.math.DoubleVector features,
double threshold)
Classifies the given features.
|
de.jungblut.math.DoubleVector |
predictProbability(de.jungblut.math.DoubleVector features)
Classifies the given features.
|
void |
train(de.jungblut.math.DoubleVector[] features,
de.jungblut.math.DoubleVector[] outcome)
Trains this classifier with the given features and the outcome.
|
void |
train(Iterable<de.jungblut.math.DoubleVector> features,
Iterable<de.jungblut.math.DoubleVector> outcome)
Trains this classifier with the given features and the outcome.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitasClassifierpublic UntrainableClassifier(Predictor predictor)
public de.jungblut.math.DoubleVector predict(de.jungblut.math.DoubleVector features)
Predictorpublic de.jungblut.math.DoubleVector predictProbability(de.jungblut.math.DoubleVector features)
PredictorpredictProbability in interface Predictorpublic int predictedClass(de.jungblut.math.DoubleVector features,
double threshold)
PredictorpredictedClass in interface Predictorthreshold - the threshold for the prediction "probability". In the
sigmoid and binary case, you want to set everything greater (>)
0.5 to 1d and everything below (<=) to 0d.public int predictedClass(de.jungblut.math.DoubleVector features)
PredictorpredictedClass in interface Predictorpublic int extractPredictedClass(de.jungblut.math.DoubleVector predict)
PredictorextractPredictedClass in interface Predictorpublic int extractPredictedClass(de.jungblut.math.DoubleVector predict,
double threshold)
PredictorextractPredictedClass in interface Predictorpublic void train(Iterable<de.jungblut.math.DoubleVector> features, Iterable<de.jungblut.math.DoubleVector> outcome)
Classifiertrain in interface Classifieroutcome - 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 void train(de.jungblut.math.DoubleVector[] features,
de.jungblut.math.DoubleVector[] outcome)
Classifiertrain in interface Classifieroutcome - 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.Copyright © 2016. All rights reserved.