C# Class MCAEmotiv.Classification.AbstractBinaryClassifier

Inheritance: AbstractClassifier, IBinaryClassifier
Datei anzeigen Open project: madelson/Emotiv-Experimenter

Public Methods

Method Description
GetBinaryClass ( int cls ) : bool?

Returns true if cls maps to a positive example, false if cls maps to a negative example, and null if there is no mapping for cls.

Protected Methods

Method Description
ConvertToBinaryExample ( Example nonBinaryExample ) : Example

Returns an example whose class is the binary equivalent of the given example's class and whose features are the same as the given example's features

PredictBinary ( Example binaryExample, double &confidence ) : int

Classify as NegativeExampleValue or PositiveExampleValue

PredictHelper ( Example example, double &confidence ) : int

Calls PredictBinary, and then converts the prediction back to a regular class value.

TrainBinary ( IArrayView binaryExamples ) : void

The values of the pairs are the labels mapped to either NegativeExampleValue or PositiveExampleValue.

TrainHelper ( IArrayView examples ) : void

Converts the examples to have binary class values, then calls TrainBinary. The mappings from regular classes to binary classes are stored until future calls to TrainHelper.

Method Details

ConvertToBinaryExample() protected method

Returns an example whose class is the binary equivalent of the given example's class and whose features are the same as the given example's features
protected ConvertToBinaryExample ( Example nonBinaryExample ) : Example
nonBinaryExample Example
return Example

GetBinaryClass() public method

Returns true if cls maps to a positive example, false if cls maps to a negative example, and null if there is no mapping for cls.
public GetBinaryClass ( int cls ) : bool?
cls int
return bool?

PredictBinary() protected abstract method

Classify as NegativeExampleValue or PositiveExampleValue
protected abstract PredictBinary ( Example binaryExample, double &confidence ) : int
binaryExample Example
confidence double
return int

PredictHelper() protected method

Calls PredictBinary, and then converts the prediction back to a regular class value.
protected PredictHelper ( Example example, double &confidence ) : int
example Example
confidence double
return int

TrainBinary() protected abstract method

The values of the pairs are the labels mapped to either NegativeExampleValue or PositiveExampleValue.
protected abstract TrainBinary ( IArrayView binaryExamples ) : void
binaryExamples IArrayView
return void

TrainHelper() protected method

Converts the examples to have binary class values, then calls TrainBinary. The mappings from regular classes to binary classes are stored until future calls to TrainHelper.
protected TrainHelper ( IArrayView examples ) : void
examples IArrayView
return void