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

Class DirectFilteringCascade

source code

ml.Predictor --+            
               |            
  cla.Classifier --+        
                   |        
cla.BinaryClassifier --+    
                       |    
           ScoredCascade --+
                           |
                          DirectFilteringCascade


A cascaded rejector of M*N weak rejectors f_1(x), ..., f_{M*N}(x).

At the m-th stage, let:
    F_M(x) = \sum_{m=1}^M c_m f_m(x),
    where
        c_m: voting weight
        f_m(x): a binary classifier outputing {-1,1}

At any stage m \in {N, 2*N, ..., M*N}, if F_m(x) < 0 then classify as 0.
Else classify as 1.



Nested Classes [hide private]

Inherited from ml.Predictor: EarlyPrediction

Instance Methods [hide private]
 
__init__(self, M, N, weaks, c) source code
 
score(self, input_point, *args, **kwds)
Compute the score of an input point.
source code

Inherited from ScoredCascade: generate_negatives, predict, scores

Inherited from cla.Classifier: get_error_rates, test

Method Details [hide private]

__init__(self, M, N, weaks, c)
(Constructor)

source code 
Overrides: ScoredCascade.__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
Overrides: ScoredCascade.score
(inherited documentation)