com.sun.labs.minion.classification
Interface ExplainableClassifierModel

All Known Implementing Classes:
Rocchio

public interface ExplainableClassifierModel

An interface for classifier models that will allow explanations to be generated inidicating why (or why not) particular documents were (or were not) classified into a given class.


Method Summary
 java.lang.String describe()
          Describes the classifier model.
 java.util.List<WeightedFeature> explain(java.lang.String key)
          Explains the score that a given document would get for this classifier.
 java.lang.String explain(java.lang.String key, boolean includeDocTerms)
          Explains why (or why not) the document with the given key would (or would not) be classified into this class.
 

Method Detail

describe

java.lang.String describe()
Describes the classifier model.


explain

java.lang.String explain(java.lang.String key,
                         boolean includeDocTerms)
Explains why (or why not) the document with the given key would (or would not) be classified into this class.

Parameters:
key - the key of the document whose classification we want to explain
includeDocTerms - if true, the explanation will include a description of the terms from the document.
Returns:
the explanation as a string.

explain

java.util.List<WeightedFeature> explain(java.lang.String key)
Explains the score that a given document would get for this classifier.

Parameters:
key - the key of the document that we want to explain
Returns:
a list of features that contributed to the score. The weight associated with the features is the proportion of contribution of that feature to the overall score. The list will be ordered from greatest contribution proportion to least contribution percentage.