diva.sketch.classification
Class WeightedEuclideanClassifier
java.lang.Object
diva.sketch.classification.AbstractClassifier
diva.sketch.classification.WeightedEuclideanClassifier
- All Implemented Interfaces:
- Classifier, TrainableClassifier
public class WeightedEuclideanClassifier
- extends AbstractClassifier
WeightedEuclideanClassifier is a trainable classifier that uses a
weighted N-dimensional distance between feature sets to classify
its input.
- Version:
- $Revision: 1.7 $
- Author:
- Heloise Hse (hwawen@eecs.berkeley.edu), Michael Shilman (michaels@eecs.berkeley.edu)
Field Summary |
protected static double |
MIN_SIGMA
The minimum sigma value; used to avoid divide-by-zero errors. |
protected static double |
NORMALIZATION
A normalization constant: 10 divided by 30, every 30 unit
in distance results in a 10% recognition drop. |
Method Summary |
Classification |
classify(FeatureSet fs)
Classify the specified feature set using each weight, by
comparing them to the mu (mean) value of the weight and
weighting it by the sigma value (standard deviation). |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
MIN_SIGMA
protected static final double MIN_SIGMA
- The minimum sigma value; used to avoid divide-by-zero errors.
- See Also:
- Constant Field Values
NORMALIZATION
protected static final double NORMALIZATION
- A normalization constant: 10 divided by 30, every 30 unit
in distance results in a 10% recognition drop.
- See Also:
- Constant Field Values
WeightedEuclideanClassifier
public WeightedEuclideanClassifier()
- Construct a classifier with no weight set. The weight
set is created by the train method.
classify
public Classification classify(FeatureSet fs)
throws ClassifierException
- Classify the specified feature set using each weight, by
comparing them to the mu (mean) value of the weight and
weighting it by the sigma value (standard deviation). For each
feature f,
value = sum((input[f] - mu[f])^2/sigma[f]^2)
Finally, normalize the value into a confidence between 0 and 100.
- Throws:
ClassifierException
Copyright © 2015 Central Laboratory of the Research Councils. All Rights Reserved.