Show / Hide Table of Contents

Class 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.

Inheritance
System.Object
Learner
Inherited Members
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.ToString()
Namespace:numl
Assembly:numl.dll
Syntax
public static class Learner

Methods

View Source

Best(IEnumerable<LearningModel>, ScoringMetric)

Retrieve best model (or model with the highest accuracy)

Declaration
public static LearningModel Best(this IEnumerable<LearningModel> models, ScoringMetric metric = ScoringMetric.Accuracy)
Parameters
Type Name Description
System.Collections.Generic.IEnumerable<LearningModel> models

List of models.

ScoringMetric metric

Scoring metric to use for model selection.

Returns
Type Description
LearningModel

Best Model.

View Source

Learn(IEnumerable<Object>, Double, Int32, IGenerator)

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.

Declaration
public static LearningModel Learn(IEnumerable<object> examples, double trainingPercentage, int repeat, IGenerator generator)
Parameters
Type Name Description
System.Collections.Generic.IEnumerable<System.Object> examples

Source data.

System.Double trainingPercentage

Data split percentage.

System.Int32 repeat

Number of repetitions per generator.

IGenerator generator

Model generator used.

Returns
Type Description
LearningModel

Best model for provided generator.

View Source

Learn(IEnumerable<Object>, Double, Int32, IGenerator[])

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.

Declaration
public static LearningModel[] Learn(IEnumerable<object> examples, double trainingPercentage, int repeat, params IGenerator[] generators)
Parameters
Type Name Description
System.Collections.Generic.IEnumerable<System.Object> examples

Source data.

System.Double trainingPercentage

Data split percentage.

System.Int32 repeat

Number of repetitions per generator.

IGenerator[] generators

Model generators used.

Returns
Type Description
LearningModel[]

Best models for each generator.

Exceptions
Type Condition
System.InvalidOperationException

Thrown when the requested operation is invalid.

  • View Source
©2017 — Seth Juarez
numl v0.9.20-beta
MIT License
docs by docfx