C# Class numl.Learner

Primary class for running model generators. It is designed to abstract the separation of training and test sets as well as best model selection.
Afficher le fichier Open project: sethjuarez/numl

Méthodes publiques

Méthode Description
Best ( this models, ScoringMetric metric = ScoringMetric.Accuracy ) : LearningModel

Retrieve best model (or model with the highest accuracy)

Learn ( IEnumerable examples, double trainingPercentage, int repeat, IGenerator generator ) : LearningModel

Trains a single model based on a generator a predefined number of times with the provided examples and data split and selects the best (or most accurate) model.

Learn ( IEnumerable examples, double trainingPercentage, int repeat ) : numl.LearningModel[]

Trains an arbitrary number of models on the provided examples by creating a separation of data based on training percentage. Each generator is rerun a predetermined amount of times.

Private Methods

Méthode Description
GenerateModel ( IGenerator generator, Matrix x, Vector y, IEnumerable examples, double trainingPct, int total ) : LearningModel

Generates a model.

GetTestExamples ( IEnumerable slice, IEnumerable examples ) : object[]

Gets test examples.

GetTestPoints ( int testCount, int total ) : IEnumerable

Gets the test points in this collection.

GetTrainingPoints ( IEnumerable testPoints, int total ) : IEnumerable

Gets the training points in this collection.

Learner ( ) : System

Static constructor.

Method Details

Best() public static méthode

Retrieve best model (or model with the highest accuracy)
public static Best ( this models, ScoringMetric metric = ScoringMetric.Accuracy ) : LearningModel
models this List of models.
metric ScoringMetric Scoring metric to use for model selection.
Résultat LearningModel

Learn() public static méthode

Trains a single model based on a generator a predefined number of times with the provided examples and data split and selects the best (or most accurate) model.
public static Learn ( IEnumerable examples, double trainingPercentage, int repeat, IGenerator generator ) : LearningModel
examples IEnumerable Source data.
trainingPercentage double Data split percentage.
repeat int Number of repetitions per generator.
generator IGenerator Model generator used.
Résultat LearningModel

Learn() public static méthode

Trains an arbitrary number of models on the provided examples by creating a separation of data based on training percentage. Each generator is rerun a predetermined amount of times.
Thrown when the requested operation is invalid.
public static Learn ( IEnumerable examples, double trainingPercentage, int repeat ) : numl.LearningModel[]
examples IEnumerable Source data.
trainingPercentage double Data split percentage.
repeat int Number of repetitions per generator.
Résultat numl.LearningModel[]