| Home | Trees | Indices | Help |
|
|---|
|
|
Recursive feature elimination.
A FeaturewiseDatasetMeasure is used to compute sensitivity maps given a certain dataset. These sensitivity maps are in turn used to discard unimportant features. For each feature selection the transfer error on some testdatset is computed. This procedure is repeated until a given StoppingCriterion is reached.
|
|||
|
Inherited from |
|||
|
|||
|
|||
|
|||
|
Inherited from Inherited from Inherited from |
|||
|
|||
|
__sensitivity_analyzer Sensitivity analyzer used to call at each step. |
|||
|
__transfer_error Compute transfer error for each feature set. |
|||
|
__feature_selector Functor which takes care about removing some features. |
|||
|
__train_clf Flag whether training classifier is required. |
|||
|
__update_sensitivity Flag whether sensitivity map is recomputed for each step. |
|||
|
nfeatures Number of features at each step. Since it is not used by the algorithm it is stored directly in the state variable |
|||
|
history Store the last step # when the feature was still present |
|||
|
|||
|
Inherited from |
|||
|
|||
Initialize recursive feature elimination
:Parameters:
sensitivity_analyzer : FeaturewiseDatasetMeasure object
transfer_error : TransferError object
used to compute the transfer error of a classifier based on a
certain feature set on the test dataset.
NOTE: If sensitivity analyzer is based on the same
classifier as transfer_error is using, make sure you
initialize transfer_error with train=False, otherwise
it would train classifier twice without any necessity.
feature_selector : Functor
Given a sensitivity map it has to return the ids of those
features that should be kept.
bestdetector : Functor
Given a list of error values it has to return a boolean that
signals whether the latest error value is the total minimum.
stopping_criterion : Functor
Given a list of error values it has to return whether the
criterion is fulfilled.
train_clf : bool
Flag whether the classifier in `transfer_error` should be
trained before computing the error. In general this is
required, but if the `sensitivity_analyzer` and
`transfer_error` share and make use of the same classifier it
can be switched off to save CPU cycles. Default `None` checks
if sensitivity_analyzer is based on a classifier and doesn't train
if so.
update_sensitivity : bool
If False the sensitivity map is only computed once and reused
for each iteration. Otherwise the senstitivities are
recomputed at each selection step.
|
Proceed and select the features recursively eliminating less important ones. Returns a tuple of two new datasets with the feature subset of
|
| Home | Trees | Indices | Help |
|
|---|
| Generated by Epydoc 3.0.1 on Mon Apr 23 23:09:27 2012 | http://epydoc.sourceforge.net |