Package pycv :: Package cs :: Package ml :: Package cla :: Package boost :: Module cascade :: Class ScoredCascade
[hide private]
[frames] | no frames]

Class ScoredCascade

source code

ml.Predictor --+        
               |        
  cla.Classifier --+    
                   |    
cla.BinaryClassifier --+
                       |
                      ScoredCascade
Known Subclasses:
DirectFilteringCascade, GeneralizedCascade

Nested Classes [hide private]

Inherited from ml.Predictor: EarlyPrediction

Instance Methods [hide private]
 
__init__(self) source code
 
score(self, input_point, *args, **kwds)
Compute the score of an input point.
source code
 
scores(self, input_data, *args, **kwds)
An array version of score().
source code
 
generate_negatives(self, nsamples, cdgenerator, *args, **kwds)
Generate 'nsamples' negative samples that pass the cascade and have scores >= 0.
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 
Overrides: cla.BinaryClassifier.__init__

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

source code 

Compute the score of an input point.

Input:

input_point: an input point

Output:

z: (boolean) whether it passes the cascade y: predicted class s: the score value

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

source code 

An array version of score(). Take an array of input points and produce their scores.

Input:
input_data: an array of input points
Output:
z: a boolean array telling whether the points pass the cascade y: an array of predicted classes s: an array of score values

generate_negatives(self, nsamples, cdgenerator, *args, **kwds)

source code 

Generate 'nsamples' negative samples that pass the cascade and have scores >= 0. May take time if samples are getting more difficult to pass the cascade.

Input:
nsamples: number of negative samples to be generated cdgenerator: a CDGenerator that can generate negative samples
Output:
train_neg: a numpy.array of newly generated samples scores_neg: an array of scores

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

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