|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object edu.cmu.minorthird.classify.BinaryClassifier edu.cmu.minorthird.classify.algorithms.linear.Hyperplane
public class Hyperplane
A weighted combination of features.
Field Summary | |
---|---|
static Feature |
BIAS_TERM
Weight for an invisible 'bias feature' which is considered to be present in every instance. |
protected gnu.trove.TObjectDoubleHashMap |
hyperplaneWeights
|
Fields inherited from class edu.cmu.minorthird.classify.BinaryClassifier |
---|
classifierLearner |
Constructor Summary | |
---|---|
Hyperplane()
|
Method Summary | |
---|---|
java.lang.String |
explain(Instance instance)
Justify inner product of hyperplane and instance weights. |
java.util.Iterator<Feature> |
featureIterator()
Iterate over all features with non-zero weight. |
double |
featureScore(Feature feature)
Weight for a feature in the hyperplane. |
Explanation |
getExplanation(Instance instance)
Return an Explanation for the classification |
boolean |
hasFeature(Feature feat)
Checks the presence of a feature in hyperplane |
void |
increment(Feature f,
double delta)
Increment one feature from the hyperplane by delta |
void |
increment(Hyperplane b)
Add hyperplane b to this hyperplane. |
void |
increment(Hyperplane b,
double delta)
Add hyperplane b*delta to this hyperplane. |
void |
increment(Instance instance,
double delta)
Add the value of the features in the instance to this hyperplane. |
void |
incrementBias(double delta)
Increment the bias term for the hyperplane by delta |
void |
multiply(double factor)
Multiply all weights by a factor |
void |
multiply(Feature f,
double delta)
Multiply one feature from the hyperplane by delta |
double |
score(Instance instance)
Inner product of hyperplane and instance weights. |
void |
setBias(double delta)
Set the bias term for the hyperplane to delta |
void |
startIgnoringWeights()
After this call is made, the hyperplane will assume that all feature weights are one in instances. |
Viewer |
toGUI()
Create a view of this object |
java.lang.String |
toString()
|
Methods inherited from class edu.cmu.minorthird.classify.BinaryClassifier |
---|
classification, getClassifierLearner, setClassifierLearner |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public static final Feature BIAS_TERM
protected transient gnu.trove.TObjectDoubleHashMap hyperplaneWeights
Constructor Detail |
---|
public Hyperplane()
Method Detail |
---|
public void startIgnoringWeights()
public double score(Instance instance)
score
in class BinaryClassifier
public java.lang.String explain(Instance instance)
explain
in interface Classifier
public Explanation getExplanation(Instance instance)
Classifier
getExplanation
in interface Classifier
public void increment(Feature f, double delta)
public void incrementBias(double delta)
public void setBias(double delta)
public void increment(Instance instance, double delta)
public void multiply(double factor)
public void multiply(Feature f, double delta)
public boolean hasFeature(Feature feat)
public void increment(Hyperplane b, double delta)
public void increment(Hyperplane b)
public double featureScore(Feature feature)
public java.util.Iterator<Feature> featureIterator()
public Viewer toGUI()
Visible
toGUI
in interface Visible
public java.lang.String toString()
toString
in class java.lang.Object
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |