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

Class Rejector

source code

ml.Predictor --+                
               |                
  cla.Classifier --+            
                   |            
cla.BinaryClassifier --+        
                       |        
       ScoringClassifier --+    
                           |    
          AdditiveClassifier --+
                               |
                              Rejector

Rejector

An AdditiveClassifier does nothing but raises an EarlyPrediction exception if the current score falls below 0.



Nested Classes [hide private]

Inherited from ml.Predictor: EarlyPrediction

Instance Methods [hide private]
 
__init__(self, sc=None)
Initialize the class.
source code
 
score(self, input_point, *args, **kwds)
Return the score of an input point.
source code

Inherited from AdditiveClassifier: preceeding_score, predict

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: AdditiveClassifier.__init__

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: AdditiveClassifier.score