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

Class ScoringClassifier

source code

ml.Predictor --+        
               |        
  cla.Classifier --+    
                   |    
cla.BinaryClassifier --+
                       |
                      ScoringClassifier
Known Subclasses:
AdditiveClassifier, TLinearClassifier

Scoring Classifier

A BinaryClassifier that classifies based on scoring the current input point. If the score is >= 0, the point is classified as class 1. Otherwise, it is classified as class 0.



Nested Classes [hide private]

Inherited from ml.Predictor: EarlyPrediction

Instance Methods [hide private]
 
__init__(self)
Initialize a Classifier.
source code
 
score(self, input_point, *args, **kwds)
Return the score of an input point.
source code
 
scores(self, input_data, *args, **kwds)
Return an array of scores of an input dataset.
source code
 
predict(self, input_point, *args, **kwds)
Predict the output class of an input point.
source code

Inherited from cla.Classifier: get_error_rates, test

Method Details [hide private]

__init__(self)
(Constructor)

source code 
Initialize a Classifier.
Overrides: cla.BinaryClassifier.__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

scores(self, input_data, *args, **kwds)

source code 
Return an array of scores of an input dataset.
Parameters:
  • input_data (numpy.array) - an array of input data
Returns:
score_arr : numpy.array
an array of scores of the input data

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

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