C# Class numl.MultiClassLearner

Primary class for running classification models. It is designed to abstract the separation of training and test sets as well as select best result across all classes.
Show file Open project: sethjuarez/numl Class Usage Examples

Public Methods

Method Description
ChangeClassLabels ( object examples, Descriptor descriptor, object truthLabel ) : Vector

Returns a Vector of positive and negative labels in 1 - 0 form.

Learn ( IGenerator generator, IEnumerable examples, double trainingPercentage, double mixingPercentage = 0.5, bool isMultiClass = true ) : ClassificationModel

Generate a multi-class classification model using a specialist classifier for each class label.

Private Methods

Method Description
GenerateModel ( IGenerator generator, object truthExamples, object falseExamples, object truthLabel, double trainingPct, object state = null ) : Tuple

Generates and returns a new Tuple of objects: IClassifier, Score and object state

MultiClassLearner ( ) : System

Method Details

ChangeClassLabels() public static method

Returns a Vector of positive and negative labels in 1 - 0 form.
public static ChangeClassLabels ( object examples, Descriptor descriptor, object truthLabel ) : Vector
examples object Object examples.
descriptor Descriptor Descriptor.
truthLabel object The truth label's value (see ).
return numl.Math.LinearAlgebra.Vector

Learn() public static method

Generate a multi-class classification model using a specialist classifier for each class label.
public static Learn ( IGenerator generator, IEnumerable examples, double trainingPercentage, double mixingPercentage = 0.5, bool isMultiClass = true ) : ClassificationModel
generator IGenerator The generator to use for each individual classifier.
examples IEnumerable Training examples of any number of classes
trainingPercentage double Percentage of training examples to use, i.e. 70% = 0.7
mixingPercentage double Percentage to mix positive and negative exmaples, i.e. 50% will add an additional 50% of /// of negative examples into each classifier when training.
isMultiClass bool Determines whether each class is mutually inclusive. /// For example: If True, each class takes on a number of classes and does not necessarily belong to one specific class. /// The ouput would then be a number of predicted classes for a single prediction. E.g. A song would be True as it may belong to classes: vocals, rock as well as bass. ///
return ClassificationModel