Package mvpa :: Package clfs :: Module meta :: Class BoostedClassifier
[hide private]
[frames] | no frames]

Class BoostedClassifier

source code


Classifier containing the farm of other classifiers.

Should rarely be used directly. Use one of its childs instead

Nested Classes [hide private]

Inherited from misc.state.ClassWithCollections: __metaclass__

Instance Methods [hide private]
 
__init__(self, clfs=None, propagate_states=True, harvest_attribs=None, copy_attribs='copy', **kwargs)
Initialize the instance.
source code
 
__repr__(self, prefixes=[])
String definition of the object of ClassWithCollections object
source code
 
_train(self, dataset)
Train BoostedClassifier
source code
 
_posttrain(self, dataset)
Custom posttrain of BoostedClassifier
source code
 
_getFeatureIds(self)
Custom _getFeatureIds for BoostedClassifier
source code
 
_predict(self, data)
Predict using BoostedClassifier
source code
 
_setClassifiers(self, clfs)
Set the classifiers used by the boosted classifier
source code
 
untrain(self)
Untrain BoostedClassifier
source code
 
getSensitivityAnalyzer(self, **kwargs)
Return an appropriate SensitivityAnalyzer
source code

Inherited from base.Classifier: __str__, clone, isTrained, predict, repredict, retrain, summary, train, trained

Inherited from base.Classifier (private): _postpredict, _prepredict, _pretrain, _regressionIsBogus, _setRetrainable

Inherited from misc.state.Harvestable (private): _harvest, _setAttribs

Inherited from misc.state.ClassWithCollections: __getattribute__, __new__, __setattr__, reset

Inherited from object: __delattr__, __format__, __hash__, __reduce__, __reduce_ex__, __sizeof__, __subclasshook__

Class Variables [hide private]
  raw_predictions = StateVariable(enabled= False, doc= "Predicti...
  raw_values = StateVariable(enabled= False, doc= "Values obtain...
  clfs = property(fget= lambda x: x.__clfs, fset= _setClassifier...

Inherited from base.Classifier: _DEV__doc__, feature_ids, predicting_time, predictions, regression, retrainable, trained_dataset, trained_labels, trained_nsamples, training_confusion, training_time, values

Inherited from base.Classifier (private): _clf_internals

Inherited from misc.state.Harvestable: harvest_attribs, harvested

Inherited from misc.state.Harvestable (private): _KNOWN_COPY_METHODS

Inherited from misc.state.ClassWithCollections: descr

Instance Variables [hide private]
  __propagate_states
Enable current enabled states in slave classifiers
  __clfs
Classifiers to use
Properties [hide private]

Inherited from object: __class__

Method Details [hide private]

__init__(self, clfs=None, propagate_states=True, harvest_attribs=None, copy_attribs='copy', **kwargs)
(Constructor)

source code 
Initialize the instance.
Parameters:
  • clfs (list) - list of classifier instances to use (slave classifiers)
  • propagate_states (bool) - either to propagate enabled states into slave classifiers. It is in effect only when slaves get assigned - so if state is enabled not during construction, it would not necessarily propagate into slaves
  • kwargs (dict) - dict of keyworded arguments which might get used by State or Classifier
Overrides: object.__init__

__repr__(self, prefixes=[])
(Representation operator)

source code 
String definition of the object of ClassWithCollections object
Parameters:
  • fullname - Either to include full name of the module
  • prefixes - What other prefixes to prepend to list of arguments
Overrides: object.__repr__
(inherited documentation)

_train(self, dataset)

source code 
Train BoostedClassifier
Overrides: base.Classifier._train

_posttrain(self, dataset)

source code 

Custom posttrain of BoostedClassifier

Harvest over the trained classifiers if it was asked to so

Overrides: base.Classifier._posttrain

_getFeatureIds(self)

source code 
Custom _getFeatureIds for BoostedClassifier
Overrides: base.Classifier._getFeatureIds

_predict(self, data)

source code 
Predict using BoostedClassifier
Overrides: base.Classifier._predict

_setClassifiers(self, clfs)

source code 

Set the classifiers used by the boosted classifier

We have to allow to set list of classifiers after the object was actually created. It will be used by MulticlassClassifier

untrain(self)

source code 

Untrain BoostedClassifier

Has to untrain any known classifier

Overrides: base.Classifier.untrain

getSensitivityAnalyzer(self, **kwargs)

source code 
Return an appropriate SensitivityAnalyzer
Overrides: base.Classifier.getSensitivityAnalyzer

Class Variable Details [hide private]

raw_predictions

Value:
StateVariable(enabled= False, doc= "Predictions obtained from each cla\
ssifier")

raw_values

Value:
StateVariable(enabled= False, doc= "Values obtained from each classifi\
er")

clfs

Value:
property(fget= lambda x: x.__clfs, fset= _setClassifiers, doc= "Used c\
lassifiers")