C# Класс 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.
Показать файл Открыть проект

Открытые методы

Метод Описание
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.

Приватные методы

Метод Описание
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.

Описание методов

Best() публичный статический Метод

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.
Результат LearningModel

Learn() публичный статический Метод

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.
Результат LearningModel

Learn() публичный статический Метод

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.
Результат numl.LearningModel[]