Package PyML :: Package classifiers :: Module svm :: Class OneClassSVM
[frames] | no frames]

Class OneClassSVM

source code

base.pymlObject.PyMLobject --+        
                             |        
    baseClassifiers.Classifier --+    
                                 |    
                               SVM --+
                                     |
                                    OneClassSVM

wrapper for the libsvm one-class SVM
Instance Methods
 
__repr__(self) source code
    Inherited from SVM
 
__init__(self, arg=None, **args) source code
 
classify(self, data, i) source code
 
decisionFunc(self, data, i) source code
 
getC(self, data) source code
 
modelDispatcher(self, data, svID, alpha, b, **args) source code
 
save(self, fileName)
save an SVM model to a file.
source code
 
train(self, data, **args)
train an SVM
source code
 
trainGist(self, data, **args) source code
 
trainGradient(self, data, **args) source code
 
trainLibsvm(self, data, **args) source code
 
trainMySMO(self, data, **args) 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
 
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
 
test(classifier, data, **args)
test a classifier on a given dataset
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
  svm_type = ONE_CLASS
  resultsObject = misc.DecisionFuncResults
    Inherited from SVM
  attributes = {'C': 10, 'nu': 0.5, 'Cmode': 'classProb', 'optim...
    Inherited from baseClassifiers.Classifier
  deepcopy = False
  type = 'classifier'
Method Details

__repr__(self)
(Representation operator)

source code 
Overrides: baseClassifiers.Classifier.__repr__