Package PyML :: Package classifiers :: Module composite :: Class CompositeClassifier
[frames] | no frames]

Class CompositeClassifier

source code

base.pymlObject.PyMLobject --+    
                             |    
    baseClassifiers.Classifier --+
                                 |
                                CompositeClassifier

A base class for creating composite classifiers

A composite classifier has an attribute called "classifier", and by default requests are forwarded to the appropriate function of the classifier (including the "test" function). For logging purposes, use the log attribute of the classifier rather than the composite log. See for example the FeatureSelect object.

Nested Classes
    Inherited from baseClassifiers.Classifier
  resultsObject
Instance Methods
 
__init__(self, classifier, **args) source code
 
__repr__(self) source code
 
preproject(self, data) source code
 
decisionFunc(self, data, i) source code
 
classify(self, data, i) source code
 
getTest(self) source code
 
setTest(self) source code
    Inherited from baseClassifiers.Classifier
 
cv(classifier, data, numFolds=5, **args)
perform k-fold cross validation
source code
 
getTrainingTime(self) source code
 
logger(self) source code
 
loo(classifier, data, **args)
perform Leave One Out
source code
 
nCV(classifier, data, **args)
runs CV n times, returning a 'ResultsList' object.
source code
 
project(self, data)
project a test dataset to the training data features.
source code
 
save(self, fileHandle) source code
 
stratifiedCV(classifier, data, numFolds=5, **args)
perform k-fold stratified cross-validation; in each fold the number of patterns from each class is proportional to the relative fraction of the class in the dataset
source code
 
train(self, data, **args) source code
 
trainFinalize(self) source code
 
trainTest(classifierTemplate, data, trainingPatterns, testingPatterns, **args)
Train a classifier on the list of training patterns, and test it on the test patterns
source code
 
twoClassClassify(self, data, i) source code
Class Variables
  deepcopy = True
  test = property(getTest, setTest, None, 'the test function of ...
test a classifier on a given dataset
    Inherited from baseClassifiers.Classifier
  type = 'classifier'
Method Details

__init__(self, classifier, **args)
(Constructor)

source code 
Overrides: baseClassifiers.Classifier.__init__

__repr__(self)
(Representation operator)

source code 
Overrides: baseClassifiers.Classifier.__repr__

classify(self, data, i)

source code 
Overrides: baseClassifiers.Classifier.classify

Class Variable Details

test

test a classifier on a given dataset
Value:
property(getTest, setTest, None, 'the test function of the underlying \
classifier')