Class GeneralizedCascade
source code
ml.Predictor --+
|
cla.Classifier --+
|
cla.BinaryClassifier --+
|
ScoredCascade --+
|
GeneralizedCascade
A cascade of M weak binary classifiers. Each classifier f_m(x) \in
{-1,+1} is associated with an score c_m, and a boolean value z_m which
tells whether the weak classifier is 'an improver' (z_m = 1) or 'a filter'
(z_m = 0) (to be explained below). Define the total scores of point x
up to stage m:
F_m(x) = \sum{i=1}^m z_i c_i f_i(x)
An improver at stage m does not classify x, but improves F_m(x)
to reach a certain goal (e.g. to minimize the total classification error up
to stage m). A filter, on the other hand, classifies x as negative
immediately iff:
G_m(x) = F_{m-1}(x) + c_i f_i(x) < 0
Or pass x to the next stage. Finally, the cascade classifies x as
positive iff F_M(x) >= 0, and negative otherwise.
|
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)
|