one_class

Module: missions.nodes.classification.one_class

Algorithms, using only one class for classification

Though this focuses on one class, the relation to the REST should still be specified.

Inheritance diagram for pySPACE.missions.nodes.classification.one_class:

Inheritance diagram of pySPACE.missions.nodes.classification.one_class

Class Summary

OneClassClassifierBase([regression, ...]) Base node to handle class labels during training to filter out irrelevant data
LibsvmOneClassNode(\*\*kwargs) Interface to one-class SVM in Libsvm package

Classes

OneClassClassifierBase

class pySPACE.missions.nodes.classification.one_class.OneClassClassifierBase(regression=False, complexity=1, weight=None, kernel_type='LINEAR', exponent=2, gamma=None, offset=0, nu=0.5, epsilon=0.1, class_labels=None, debug=False, max_time=3600, tolerance=0.001, complexities_path=None, keep_vectors=False, use_list=False, multinomial=False, add_type='ADD_ALL', discard_type='REMOVE_OLDEST', keep_only_sv=False, basket_size=inf, relabel=False, border_handling='USE_ONLY_BORDER_POINTS', scale_factor_small=0.3, scale_factor_tall=0.5, p_threshold=0.8, show_plot=False, save_plot=False, cdt_threshold=10, u_retrain=False, training_set_ratio='DONT_HANDLE_RATIO', plot_storage='./plot_storage', ratio=0.5, **kwargs)[source]

Bases: pySPACE.missions.nodes.classification.base.RegularizedClassifierBase

Base node to handle class labels during training to filter out irrelevant data

Class_labels:List of the two or more classes, where first element is the relevant one and the second is the negative class.

Class Components Summary

train(data, label) Special mapping for one-class classification
train(data, label)[source]

Special mapping for one-class classification

Reduce training data to the one main class.

LibsvmOneClassNode

class pySPACE.missions.nodes.classification.one_class.LibsvmOneClassNode(**kwargs)[source]

Bases: pySPACE.missions.nodes.classification.svm_variants.external.LibSVMClassifierNode, pySPACE.missions.nodes.classification.one_class.OneClassClassifierBase

Interface to one-class SVM in Libsvm package

Parameters

Parameters are as specified in LibSVMClassifierNode, except the svm_type, which is set manually in this node to “one-class SVM”.

class_labels:see: OneClassClassifierBase

Exemplary Call

-
    node : LibsvmOneClass
    parameters :
        complexity : 1
        kernel_type : "LINEAR"
        class_labels : ['Target', 'Standard']
        weight : [1,3]
        debug : True
        store : True
        max_iterations : 100
POSSIBLE NODE NAMES:
 
  • LibsvmOneClassNode
  • LibsvmOneClass
POSSIBLE INPUT TYPES:
 
  • FeatureVector

Class Components Summary

input_types
train(data, label)
__init__(**kwargs)[source]
train(data, label)[source]
input_types = ['FeatureVector']