| Home | Trees | Indices | Help |
|---|
|
|
An umbrella package containing all boosting modules.
|
|||
| |||
|
|||
|
OnlineDiscreteBoostedClassifier DiscreteBoostedClassifier with an ability to learn online. |
|||
|
DiscreteBoostedClassifier Discrete Boosted Classifier of this form:... |
|||
|
SimpleCascade A cascade of binary classifiers. |
|||
|
GeneralizedCascade A cascade of M weak binary classifiers. |
|||
|
DirectFilteringCascade A cascaded rejector of M*N weak rejectors f_1(x), ..., f_{M*N}(x). |
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
| __doc__ | |||
|
|||
Train a DiscreteBoostedClassifier using Viola and Jones'
asymmetric boost (NIPS'02)
Warning:
This function is now obsolete, use train_DBC() instead.
Input:
classification_dataset: a WeightedCDataset of 2 classes
trainfunc: a function that takes a WeightedCDataset as input
and returns a BinaryClassifier
M: the maximum number of stages
k: false negatives penalized k times more than false positives
evenly: distribute lambda evenly among the weak classifiers
can_learn : boolean
whether the resulting DiscreteBoostedClassifier can learn
incrementally
polarity_balancing: use polarity balancing for online-learning?
0 = no polarity balancing, same as Oza-Rusell (ICSMC'05)
1 = polarity balancing, Pham-Cham (CVPR'07)
Output:
a DiscreteBoostedClassifier
|
Train a DiscreteBoostedClassifier
Input:
classification_dataset: a WeightedCDataset of 2 classes
trainfunc: a function that takes a WeightedCDataset as input
and returns a BinaryClassifier as a weak classifier
M: the maximum number of weak classifier
k: false negatives penalized k times more than false positives
balancing: type of balancing among weak classifiers
0 = no balancing at all, this is the original AdaBoost's method
1 = asymmetric weight balancing, Viola-Jones (NIPS'02)
2 = skewness balancing, Pham-Cham (CVPR'07)
can_learn : boolean
whether the resulting DiscreteBoostedClassifier can learn
incrementally
polarity_balancing: use polarity balancing for online-learning?
0 = no polarity balancing, same as Oza-Rusell (ICSMC'05)
1 = polarity balancing, Pham-Cham (CVPR'07)
previous: previous additive classifier, default is None
Output:
a DiscreteBoostedClassifier
|
Train an offline DiscreteBoostedClassifier
Criteria:
criterion=0:
rg \min_f (\lambda P(1) FRR(f) + P(0) FAR(f)) / (\lambda P(1) + P(0))
criterion=1:
rg \min_f (\lambda FRR(f) + FAR(f)) / (\lambda + 1)
:Paramters:
scd : ScoringCDataset
a binary ScoringCDataset
trainfunc: a function that takes a WeightedCDataset as input
and returns a BinaryClassifier as a weak classifier
M : int
the maximum number of weak classifiers
criterion : int
which criterion
param1 : double
\lambda for the criterion
skewness_balancing : int
type of balancing among weak classifiers
0 = no balancing at all, the original AdaBoost's method
1 = asymmetric weight balancing, Viola-Jones (NIPS'02)
2 = skewness balancing, Pham-Cham (CVPR'07)
(N/A if criterion=1)
preceeding_sc : ScoringClassifier
a classifier to preceed this newly trained one,
default is None
extra_output : boolean
if True then produce extra useful information
:Returns:
dbc : DiscreteBoostedClassifier
the newly trained DiscreteBoostedClassifier
err : double (extra_output)
training error, or training criterion function value
scd2 : ScoringCDataset (extra_output)
a new ScoringCDataset with scores augmented by this dbc,
|
Train a DiscreteBoostedClassifier using our (Pham and Cham's)
asymmetric boost (CVPR'07)
Warning:
This function is now obsolete, use train_DBC() instead.
Input:
classification_dataset: a WeightedCDataset of 2 classes
trainfunc: a function that takes a WeightedCDataset as input
and returns a BinaryClassifier
M: the maximum number of stages
k: false negatives penalized k times more than false positives
can_learn : boolean
whether the resulting DiscreteBoostedClassifier can learn
incrementally
polarity_balancing: use polarity balancing for online-learning?
0 = no polarity balancing, same as Oza-Rusell (ICSMC'05)
1 = polarity balancing, Pham-Cham (CVPR'07)
Output:
a DiscreteBoostedClassifier
|
Convert a binary ScoringCDataset into a WeightedCDataset. The formula is weight(x,y) = exp(-y score(x,y)), where y in {-1,1}
|
Train a DiscreteBoostedClassifier using AdaBoost (Friend et al's DiscreteAdaboost)
Warning:
This function is now obsolete, use train_DBC() instead.
Input:
classification_dataset: a WeightedCDataset of 2 classes
trainfunc: a function that takes a WeightedCDataset as input
and returns a BinaryClassifier
M: the maximum number of stages
can_learn : boolean
whether the resulting DiscreteBoostedClassifier can learn
incrementally
polarity_balancing: use polarity balancing for online-learning?
0 = no polarity balancing, same as Oza-Rusell (ICSMC'05)
1 = polarity balancing, Pham-Cham (CVPR'07)
Output:
a DiscreteBoostedClassifier
|
Train a DirectFilteringCascade using my method in my notebook dated 2 May 2007.
Goal: to train a cascade such that at decisive stages, FAR is minimized
and FRR is upper-bounded by alpha.
Input:
cd: a ScoredWCDataset of 2 classes -- modifiable
cdgenerator: a CDataGenerator for the 'cd'
initfunc(cd): a function that takes WeightedCDataset 'cd',
initializes some data, and returns 'data'
trainfunc(data,minDR): a function that takes initalized 'data'
and constant 'minDR' as input and returns a BinaryClassifier. The
function must be able to train to have at least 'minDR' detection
rate.
M: the maximum number of stages
N: the number of weak classifiers per stage
alpha: the maximum value of an exponential-based upper bound of FRR,
0 <= alpha <= 1
Output:
a DirectFilteringCascade
|
Train a cascade of at most maxM filters (binary classifiers).
Input:
cd: a WeightedCDataset -- modifiable
trainfunc: a function that takes a WeightedCDataset as input
and returns a BinaryClassifier
maxM: the maximum number of filters to be trained
maxFR: if the filtering rate (the number of negatives after training
divided by the number of negatives before training) rises above
'maxFR' then stop
Output:
cascade: a Cascade of filters
new_classification_dataset: a new WeightedCDataset filtered by the
cascade, useful for subsequent training
|
| Home | Trees | Indices | Help |
|---|
| Generated by Epydoc 3.0beta1 on Mon Feb 25 10:24:15 2008 | http://epydoc.sourceforge.net |