linear_classifier

Module: missions.nodes.classification.linear_classifier

Implement standard linear classifiers

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

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

Class Summary

FDAClassifierNode([class_labels]) Classify with Fisher’s linear discriminant analysis
BayesianLinearDiscriminantAnalysisClassifierNode([...]) Classify with the bayesian linear discriminant analysis

Classes

FDAClassifierNode

class pySPACE.missions.nodes.classification.linear_classifier.FDAClassifierNode(class_labels=[], **kwargs)[source]

Bases: pySPACE.missions.nodes.base_node.BaseNode

Classify with Fisher’s linear discriminant analysis

Note

Wrapper around the MDP FDA node

Parameters

class_labels:

Determines the order of the two classes. This is important, when you want that the prediction value is negative for the first class and positive for the other one. Otherwise this variable is set by adding the labels, when they first occur.

(optional, default: [])

Exemplary Call

-
    node : FDA_Classifier
    parameters :
        class_labels : ["Target","Standard"]
Author:

Jan Hendrik Metzen (jhm@informatik.uni-bremen.de)

Created:

2008/08/26

Last change:

2010/08/13 by Mario Krell

POSSIBLE NODE NAMES:
 
  • FDAClassifierNode
  • FDAClassifier
  • FDA_Classifier
POSSIBLE INPUT TYPES:
 
  • FeatureVector

Class Components Summary

_execute(x[, fda_range]) Executes the classifier on the given data vector x
_stop_training() Delegate training to superclass method
_train(x, class_label) Collect data for later training
input_types
is_supervised() Returns whether this node requires supervised training
is_trainable() Returns whether this node is trainable
__init__(class_labels=[], **kwargs)[source]
is_trainable()[source]

Returns whether this node is trainable

is_supervised()[source]

Returns whether this node requires supervised training

_execute(x, fda_range=None)[source]

Executes the classifier on the given data vector x

_train(x, class_label)[source]

Collect data for later training

_stop_training()[source]

Delegate training to superclass method

input_types = ['FeatureVector']

BayesianLinearDiscriminantAnalysisClassifierNode

class pySPACE.missions.nodes.classification.linear_classifier.BayesianLinearDiscriminantAnalysisClassifierNode(class_labels=[], **kwargs)[source]

Bases: pySPACE.missions.nodes.base_node.BaseNode

Classify with the bayesian linear discriminant analysis

A detailed description can be found in:

Ulrich Hoffmann et al. “An efficient P300-based brain-computer interface for disabled subjects”, Journal of Neuroscience Methods, Volume 167, Issue 1,

Bishop, 2006 C.M. Bishop, “Pattern recognition and machine learning”, Springer (2006)

MacKay, 1992 D.J.C. MacKay, “Bayesian interpolation”, Neural Comput 4 (3) (1992) pp. 415-447

Parameters

class_labels:

Determines the order of the two classes. This is important, when you want that the prediction value is negative for the first class and positive for the other one. Otherwise this variable is set by adding the labels, when they first occur.

(optional, default: [])

Exemplary Call

-
    node : BLDA_Classifier
    parameters :
        class_labels : ["Target","Standard"]
Author:

Hendrik Woehrle (hendrik.woehrle@dfki.de)

Created:

2011/07/25

POSSIBLE NODE NAMES:
 
  • BLDA_Classifier
  • BayesianLinearDiscriminantAnalysisClassifier
  • BayesianLinearDiscriminantAnalysisClassifierNode
POSSIBLE INPUT TYPES:
 
  • FeatureVector

Class Components Summary

_execute(data) Executes the classifier on the given data vector x
_stop_training([debug]) Perform the actual model building by performing bayesian regression
_train(data, label) Train node on given example data for class label.
input_types
is_supervised() Returns whether this node requires supervised training
is_trainable() Returns whether this node is trainable.
__init__(class_labels=[], **kwargs)[source]
is_trainable()[source]

Returns whether this node is trainable.

is_supervised()[source]

Returns whether this node requires supervised training

_train(data, label)[source]

Train node on given example data for class label.

In this method, all data items and labels are buffered for batch training in a matrices.

_stop_training(debug=False)[source]

Perform the actual model building by performing bayesian regression

_execute(data)[source]

Executes the classifier on the given data vector x

input_types = ['FeatureVector']