Package pycv :: Package cs :: Package ml :: Package cla :: Module score :: Class AdditiveClassifier
[hide private]
[frames] | no frames]

Class AdditiveClassifier

source code

ml.Predictor --+            
               |            
  cla.Classifier --+        
                   |        
cla.BinaryClassifier --+    
                       |    
       ScoringClassifier --+
                           |
                          AdditiveClassifier
Known Subclasses:
Rejector, Resetter, Shifter, boost.boosting.DiscreteBoostedClassifier

Additive Classifier

A ScoringClassifier that adds a value to the score predicted by another ScoringClassifier. The new score is supposed to give a better prediction of the output class.



Nested Classes [hide private]

Inherited from ml.Predictor: EarlyPrediction

Instance Methods [hide private]
 
__init__(self, sc=None)
Initialize the class.
source code
 
preceeding_score(self, input_point, *args, **kwds)
Return the input point's score from the preceeding classifier.
source code
 
predict(self, input_point, *args, **kwds)
Predict the output class of an input point.
source code
 
score(self, input_point, *args, **kwds)
Return the score of an input point.
source code

Inherited from ScoringClassifier: scores

Inherited from cla.Classifier: get_error_rates, test

Method Details [hide private]

__init__(self, sc=None)
(Constructor)

source code 
Initialize the class.
Parameters:
  • sc (ScoringClassifier) - a ScoringClassifier to preceed this classifier, or None if there's no classifier to preceed
Overrides: ScoringClassifier.__init__

preceeding_score(self, input_point, *args, **kwds)

source code 
Return the input point's score from the preceeding classifier.
Returns:
score : double
the previous score of the input point

predict(self, input_point, *args, **kwds)

source code 
Predict the output class of an input point.
Overrides: ScoringClassifier.predict

score(self, input_point, *args, **kwds)

source code 
Return the score of an input point.
Parameters:
  • input_point (a numpy.array) - an input point
Returns:
val : double
the input point's score
Overrides: ScoringClassifier.score