linear_classifier¶
Module: missions.nodes.classification.linear_classifier
¶
Implement standard linear classifiers
Inheritance diagram for 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 -
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. -
_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
-
input_types
= ['FeatureVector']¶