C# Class MCAEmotiv.Classification.Classifiers

Extension methods for Classifiers
Show file Open project: madelson/Emotiv-Experimenter

Public Methods

Method Description
AccuracyOn ( this classifier, IEnumerable labeledExamples ) : double

Computes the classifier's accuracy in predicting the set of examples

AsOnlineClassifier ( this classifier ) : IOnlineClassifier

Wraps the classifier in an online classifier which works by storing all input examples and retraining the classifier on the stored examples as well as the new examples on each call to TrainMore

ErrorOn ( this classifier, IEnumerable labeledExamples ) : double

Computes the classifier's error in predicting the set of examples

IsNegative ( this classifier, Example example ) : bool

As classifier.IsNegative(classifier, example.Class)

IsNegative ( this classifier, int cls ) : bool

Does cls currently map to a negative example in this classifier?

IsPositive ( this classifier, Example example ) : bool

As classifier.IsPositive(classifier, example.Class)

IsPositive ( this classifier, int cls ) : bool

Does cls currently map to a positive example in this classifier?

Predict ( this classifier, IEnumerable examples ) : IEnumerable>

Returns a Trio of (example, predicted class, confidence) for each example

Predict ( this classifier, Example example ) : int

Predict without the confidence parameter

TrainMore ( this classifier, Example labeledExample ) : void

TrainMore, but with a single example

Method Details

AccuracyOn() public static method

Computes the classifier's accuracy in predicting the set of examples
public static AccuracyOn ( this classifier, IEnumerable labeledExamples ) : double
classifier this
labeledExamples IEnumerable
return double

AsOnlineClassifier() public static method

Wraps the classifier in an online classifier which works by storing all input examples and retraining the classifier on the stored examples as well as the new examples on each call to TrainMore
public static AsOnlineClassifier ( this classifier ) : IOnlineClassifier
classifier this
return IOnlineClassifier

ErrorOn() public static method

Computes the classifier's error in predicting the set of examples
public static ErrorOn ( this classifier, IEnumerable labeledExamples ) : double
classifier this
labeledExamples IEnumerable
return double

IsNegative() public static method

As classifier.IsNegative(classifier, example.Class)
public static IsNegative ( this classifier, Example example ) : bool
classifier this
example Example
return bool

IsNegative() public static method

Does cls currently map to a negative example in this classifier?
public static IsNegative ( this classifier, int cls ) : bool
classifier this
cls int
return bool

IsPositive() public static method

As classifier.IsPositive(classifier, example.Class)
public static IsPositive ( this classifier, Example example ) : bool
classifier this
example Example
return bool

IsPositive() public static method

Does cls currently map to a positive example in this classifier?
public static IsPositive ( this classifier, int cls ) : bool
classifier this
cls int
return bool

Predict() public static method

Returns a Trio of (example, predicted class, confidence) for each example
public static Predict ( this classifier, IEnumerable examples ) : IEnumerable>
classifier this
examples IEnumerable
return IEnumerable>

Predict() public static method

Predict without the confidence parameter
public static Predict ( this classifier, Example example ) : int
classifier this
example Example
return int

TrainMore() public static method

TrainMore, but with a single example
public static TrainMore ( this classifier, Example labeledExample ) : void
classifier this
labeledExample Example
return void