A class for training and testing a classifier on a grid of parameter
values for two attributes of the classifier.
|
__init__(self,
arg,
attribute1='C',
values1=[0.1,1,10,100,1000],
attribute2='kernel.gamma',
values2=[0.001,0.01,0.1,1,10]) |
source code
|
|
|
|
|
|
|
|
|
|
|
cv(self,
data,
**args)
perform k-fold cross validation |
source code
|
|
|
|
|
|
|
|
|
stratifiedCV(self,
data,
**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
|
|
|
|
|
|
|
|
|
|
|
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
|
|
|
|
|
|
|
trainTest(classifierTemplate,
data,
trainingPatterns,
testingPatterns,
**args)
Train a classifier on the list of training patterns, and test it
on the test patterns |
source code
|
|
|
|