Microsoft.ML.Trainers Namespace

Classes

LinearTrainerBase<TTransformer,TModel>
MatrixFactorizationTrainer

Train a matrix factorization model. It factorizes the training matrix into the product of two low-rank matrices.

MatrixFactorizationTrainer.Options
MultiClassNaiveBayesModelParameters
MultiClassNaiveBayesTrainer
MultiClassNaiveBayesTrainer.Arguments
Ova
Ova.Arguments

Arguments passed to OVA.

OvaModelParameters
Pkpd

In this strategy, a binary classification algorithm is trained on each pair of classes. The pairs are unordered but created with replacement: so, if there were three classes, 0, 1, 2, we would train classifiers for the pairs (0,0), (0,1), (0,2), (1,1), (1,2), and(2,2). For each binary classifier, an input data point is considered a positive example if it is in either of the two classes in the pair, and a negative example otherwise. At prediction time, the probabilities for each pair of classes is considered as the probability of being in either class of the pair given the data, and the final predictive probabilities out of that per class are calculated given the probability that an example is in any given pair.

These two can allow you to exploit trainers that do not naturally have a multiclass option, for example, using the Runtime.FastTree.FastTreeBinaryClassificationTrainer to solve a multiclass problem. Alternately, it can allow ML.NET to solve a "simpler" problem even in the cases where the trainer has a multiclass option, but using it directly is not practical due to, usually, memory constraints.For example, while a multiclass logistic regression is a more principled way to solve a multiclass problem, it requires that the learner store a lot more intermediate state in the form of L-BFGS history for all classes simultaneously, rather than just one-by-one as would be needed for OVA.

Pkpd.Arguments

Arguments passed to PKPD.

PkpdModelParameters
PoissonRegression

Trains a Poisson Regression model.

PoissonRegression.Options
PriorModelParameters
PriorTrainer

Learns the prior distribution for 0/1 class labels and just outputs that.

PriorTrainer.Arguments
RandomModelParameters

The predictor implements the Predict() interface. The predictor returns a uniform random probability and classification assignment.

RandomTrainer

A trainer that trains a predictor that returns random values

RandomTrainer.Arguments
SdcaBinaryTrainer
SdcaBinaryTrainer.Options
SdcaMultiClassTrainer

Train an SDCA linear model.

SdcaMultiClassTrainer.Options
SdcaRegressionTrainer

Train an SDCA linear model.

SdcaRegressionTrainer.Options
SdcaTrainerBase<TArgs,TTransformer,TModel>.ArgumentsBase
SdcaTrainerBase<TArgs,TTransformer,TModel>.IdToIdxLookup

A hash table data structure to store Id of type Microsoft.ML.Data.RowId, and accommodates size larger than 2 billion. This class is an extension based on BCL. Two operations are supported: adding and retrieving an id with asymptotically constant complexity. The bucket size are prime numbers, starting from 3 and grows to the next prime larger than double the current size until it reaches the maximum possible size. When a table growth is triggered, the table growing operation initializes a new larger bucket and rehash the existing entries to the new bucket. Such operation has an expected complexity proportional to the size.

SdcaTrainerBase<TArgs,TTransformer,TModel>
StochasticGradientDescentClassificationTrainer
StochasticGradientDescentClassificationTrainer.Options

Enums

MatrixFactorizationTrainer.LossFunctionType
OvaModelParameters.OutputFormula

Function applied to output of predictors. Assume that we have n predictors (one per class) and for the i-th predictor, y_i is its raw output and p_i is its probability output. Note that not all predictors are able to produce probability output.

Raw: output the result of predictors without post-processing. Output is [y_1, ..., y_n]. ProbabilityNormalization: fetch probability output of each class probability from provided predictors and make sure the sume of class probabilities is one. Output is [p_1 / (p_1 + ... + p_n), ..., p_n / (p_1 + ... + p_n)]. Softmax: Generate probability by feeding raw outputs to softmax function. Output is [z_1, ..., z_n], where z_i is exp(y_i) / (exp(y_1) + ... + exp(y_n)).

SdcaTrainerBase<TArgs,TTransformer,TModel>.MetricKind