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

Class NBClassifier

source code

    ml.PredictPdfInterface --+
                             |
ml.OnlineLearningInterface --+
                             |
          ml.Predictor --+   |
                         |   |
            cla.Classifier --+
                             |
                            NBClassifier

Nested Classes [hide private]

Inherited from ml.Predictor: EarlyPrediction

Instance Methods [hide private]
 
__init__(self, nclasses, stats2e)
Initialize a Classifier.
source code
 
predict_pdf(self, input_point, *args, **kwds)
Predict the output class pdf given an input point.
source code
 
learn(self, input_point, j, w=None, *args, **kwds)
Learn incrementally with a new input point, its class, and optionally its weight.
source code

Inherited from ml.PredictPdfInterface: predict, test_pdf

Inherited from cla.Classifier: get_error_rates, test

Method Details [hide private]

__init__(self, nclasses, stats2e)
(Constructor)

source code 
Initialize a Classifier.
Overrides: cla.Classifier.__init__
(inherited documentation)

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

source code 
Predict the output class pdf given an input point.
Overrides: ml.PredictPdfInterface.predict_pdf
(inherited documentation)

learn(self, input_point, j, w=None, *args, **kwds)

source code 

Learn incrementally with a new input point, its class, and optionally its weight.

Input:
input_point: a new input point j: its corresponding class w: optionally its weight, or 1 if not specified
Overrides: ml.OnlineLearningInterface.learn