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

Class Classifier

source code

ml.Predictor --+
               |
              Classifier
Known Subclasses:
BinaryClassifier, nb.NBClassifier

Nested Classes [hide private]

Inherited from ml.Predictor: EarlyPrediction

Instance Methods [hide private]
 
__init__(self, nclasses)
Initialize a Classifier.
source code
 
predict(self, input_point, *args, **kwds)
Predict the output class of an input point.
source code
 
test(self, input_data, *args, **kwds)
Predict the output classes of an array of input points.
source code
 
get_error_rates(self, wcd, *args, **kwds)
Estimate the (weighted) error rate of the classifier for each class
source code
Method Details [hide private]

__init__(self, nclasses)
(Constructor)

source code 
Initialize a Classifier.
Parameters:
  • nclasses (int) - the number of output classes

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

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

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

source code 
Predict the output classes of an array of input points.
Overrides: ml.Predictor.test

get_error_rates(self, wcd, *args, **kwds)

source code 

Estimate the (weighted) error rate of the classifier for each class

An error rate here is a false prediction rate, or equivalently, the conditional probability of getting a wrong prediction given the class.

Returns:
err : array(shape=(J,), 'd')
err[j] = error rate for class j

Parameters: wcd : a WeightedCDataset