edu.cmu.minorthird.classify.transform
Class PositiveScoresTransformClassifier

java.lang.Object
  extended by edu.cmu.minorthird.classify.transform.PositiveScoresTransformClassifier
All Implemented Interfaces:
Classifier, java.io.Serializable

public class PositiveScoresTransformClassifier
extends java.lang.Object
implements Classifier, java.io.Serializable

Author:
Vitor R. Carvalho Classifiers that, from a linear binary classfier, perform the classification of new instances by disregarding all features whose hyperplane axis are negative.
See Also:
Serialized Form

Constructor Summary
PositiveScoresTransformClassifier(Classifier c, Dataset data)
           
 
Method Summary
 double calculatePositiveThreshold(Dataset data)
          iterate over training data to discover positive threshold.
 ClassLabel classification(Instance instance)
          Return a predicted type for the span, as a class label.
 java.lang.String explain(Instance instance)
          Return some string that 'explains' the classification
 Explanation getExplanation(Instance instance)
          Return an Explanation for the classification
static void main(java.lang.String[] args)
           
 double score(Instance instance)
          Finds the maximum positive axis weigth of hyperplane and calculates minFeatScore based on percentage this value this was never tested!
 double score(Instance instance, double minFeatScore)
          Inner product of hyperplane and instance weights, disregarding the negative dimensions of hyperplane.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PositiveScoresTransformClassifier

public PositiveScoresTransformClassifier(Classifier c,
                                         Dataset data)
Method Detail

classification

public ClassLabel classification(Instance instance)
Description copied from interface: Classifier
Return a predicted type for the span, as a class label.

Specified by:
classification in interface Classifier

calculatePositiveThreshold

public double calculatePositiveThreshold(Dataset data)
iterate over training data to discover positive threshold. the threshold is the weighted average between positive and negative mean scores


score

public double score(Instance instance)
Finds the maximum positive axis weigth of hyperplane and calculates minFeatScore based on percentage this value this was never tested!


score

public double score(Instance instance,
                    double minFeatScore)
Inner product of hyperplane and instance weights, disregarding the negative dimensions of hyperplane.


explain

public java.lang.String explain(Instance instance)
Description copied from interface: Classifier
Return some string that 'explains' the classification

Specified by:
explain in interface Classifier

getExplanation

public Explanation getExplanation(Instance instance)
Description copied from interface: Classifier
Return an Explanation for the classification

Specified by:
getExplanation in interface Classifier

main

public static void main(java.lang.String[] args)