Package mvpa :: Package clfs :: Module base :: Class BinaryClassifier
[hide private]
[frames] | no frames]

Class BinaryClassifier

source code


ProxyClassifier which maps set of two labels into +1 and -1
Nested Classes [hide private]

Inherited from misc.state.Stateful: __metaclass__

Instance Methods [hide private]
 
__init__(self, clf, poslabels, neglabels, **kwargs)
Initialize the instance
source code
 
__str__(self)
str(x)
source code
 
_train(self, dataset)
Train BinaryClassifier
source code
 
_predict(self, data)
Predict the labels for a given data
source code

Inherited from ProxyClassifier: getSensitivityAnalyzer, untrain

Inherited from Classifier: isTrained, predict, regression, train, train2predict, trained

Inherited from misc.state.Stateful: __getattribute__, __repr__, __setattr__, reset

Inherited from object: __delattr__, __hash__, __new__, __reduce__, __reduce_ex__

Class Variables [hide private]

Inherited from ProxyClassifier: clf

Inherited from Classifier: feature_ids, predicting_time, predictions, retrainable, trained_dataset, trained_labels, training_confusion, training_time, values

Inherited from Classifier (private): _clf_internals

Instance Variables [hide private]

Inherited from ProxyClassifier (private): _regression

Inherited from Classifier (private): _train2predict

Properties [hide private]

Inherited from misc.state.Stateful: descr

Inherited from object: __class__

Method Details [hide private]

__init__(self, clf, poslabels, neglabels, **kwargs)
(Constructor)

source code 
Initialize the instance
Parameters:
  • clf (Classifier) - classifier to use
  • poslabels (list) - list of labels which are treated as +1 category
  • neglabels (list) - list of labels which are treated as -1 category
Overrides: object.__init__

__str__(self)
(Informal representation operator)

source code 
str(x)
Overrides: object.__str__
(inherited documentation)

_train(self, dataset)

source code 
Train BinaryClassifier
Overrides: Classifier._train

_predict(self, data)

source code 

Predict the labels for a given data

Predicts using binary classifier and spits out list (for each sample) where with either poslabels or neglabels as the "label" for the sample. If there was just a single label within pos or neg labels then it would return not a list but just that single label.

Overrides: Classifier._predict