Package pyvision :: Package ml :: Module crossvalidate :: Class CrossValidation
[hide private]
[frames] | no frames]

Class CrossValidation

source code

Instance Methods [hide private]
 
__init__(self, n_folds=5)
Initializing a cross validation algorithm.
source code
 
setAlgorithm(self, alg_class, args=[], kwargs={}) source code
 
getTunedAlgorithm(self) source code
 
setTraining(self, labels, data, folds=None)
Adds training data.
source code
 
addTunableOption(self, keyword, values)
This specifie
source code
 
tuneAlogirthmExaustive(self, verbose=True)
This conducts an exaustive search of all tunable parameters to find the best tuning.
source code
 
runTest(self, alg_class, args, kwargs, verbose=True) source code
 
getBestTuning(self)
Returns: the best known tuning.
source code
Method Details [hide private]

setTraining(self, labels, data, folds=None)

source code 

Adds training data.

Parameters:
  • label - a list of labels (int,str) or regression outputs (float)
  • data - a matrix of data values each row is a feature vector
  • fold - a list specifying the folds for validation. If None it will be randomly assigned.

addTunableOption(self, keyword, values)

source code 

This specifie

Parameters:
  • keyword (str) - A keyword to use in the algorithm initializer.
  • values (list) - A list or tuple of values to use for keyword.

getBestTuning(self)

source code 
Returns:
the best known tuning.