Microsoft.ML.Trainers Namespace

The namespace containing the algorithms used for training a machine learning model.

Classes

AveragedLinearOptions

Arguments class for averaged linear trainers.

AveragedLinearTrainer<TTransformer,TModel>

Base class for averaged linear trainers.

AveragedPerceptronTrainer

The IEstimator<TTransformer> for the averaged perceptron trainer.

AveragedPerceptronTrainer.Options

Options for the AveragedPerceptronTrainer.

CoefficientStatistics

Represents a coefficient statistics object containing statistics about the calculated model parameters.

ComputeLogisticRegressionStandardDeviation

Computes the standard deviation matrix of each of the non-zero training weights, needed to calculate further the standard deviation, p-value and z-Score. If you need fast calculations, use the ComputeLogisticRegressionStandardDeviation implementation in the Microsoft.ML.Mkl.Components package, which makes use of hardware acceleration. Due to the existence of regularization, an approximation is used to compute the variances of the trained linear coefficients.

ComputeLRTrainingStdThroughMkl
ExpLoss

Exponential Loss

FeatureContributionCalculator

Support for feature contribution calculation.

FieldAwareFactorizationMachineModelParameters
FieldAwareFactorizationMachinePredictionTransformer
FieldAwareFactorizationMachineTrainer

Train a field-aware factorization machine for binary classification using ADAGRAD (an advanced stochastic gradient method).

FieldAwareFactorizationMachineTrainer.Options
HingeLoss

Hinge Loss

KMeansModelParameters
KMeansTrainer

K-means is a popular clustering algorithm. With K-means, the data is clustered into a specified number of clusters in order to minimize the within-cluster sum of squares.

KMeansTrainer.Options
LbfgsLogisticRegressionBinaryTrainer

Logistic Regression is a method in statistics used to predict the probability of occurrence of an event and can be used as a classification algorithm. The algorithm predicts the probability of occurrence of an event by fitting data to a logistical function.

LbfgsLogisticRegressionBinaryTrainer.Options
LbfgsMaximumEntropyMulticlassTrainer

Logistic Regression is a method in statistics used to predict the probability of occurrence of an event and can be used as a classification algorithm. The algorithm predicts the probability of occurrence of an event by fitting data to a logistical function.

LbfgsMaximumEntropyMulticlassTrainer.Options
LbfgsPoissonRegressionTrainer

The IEstimator<TTransformer> for training a Poisson regression model.

LbfgsPoissonRegressionTrainer.Options

Options for the LbfgsPoissonRegressionTrainer.

LbfgsTrainerBase<TOptions,TTransformer,TModel>.OptionsBase

Base options for L-BFGS-based trainers.

LbfgsTrainerBase<TOptions,TTransformer,TModel>

Base class for L-BFGS-based trainers.

LinearBinaryModelParameters

The model parameters class for linear binary trainer estimators.

LinearModelParameters
LinearModelParameterStatistics

The statistics for linear predictor.

LinearMulticlassModelParameters

Linear model of multiclass classifiers. It outputs raw scores of all its linear models, and no probablistic output is provided.

LinearMulticlassModelParametersBase

Common linear model of multiclass classifiers. LinearMulticlassModelParameters contains a single linear model per class.

LinearRegressionModelParameters

The model parameters class for linear regression.

LinearSvmTrainer

Linear SVM that implements PEGASOS for training. See: http://ttic.uchicago.edu/~shai/papers/ShalevSiSr07.pdf

LinearSvmTrainer.Options
LinearTrainerBase<TTransformer,TModel>
LogLoss
MatrixFactorizationTrainer

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

MatrixFactorizationTrainer.Options

Advanced options for the MatrixFactorizationTrainer.

MaximumEntropyModelParameters

Linear maximum entropy model of multiclass classifiers. It outputs classes probabilities. This model is also known as multinomial logistic regression. Please see https://en.wikipedia.org/wiki/Multinomial_logistic_regression for details.

MetaMulticlassTrainer<TTransformer,TModel>
ModelParametersBase<TOutput>

A base class for predictors producing TOutput. Note: This provides essentially no value going forward. New predictors should just derive from the interfaces they need.

ModelStatisticsBase

The statistics for linear predictor.

NaiveBayesMulticlassModelParameters
NaiveBayesMulticlassTrainer
OlsModelParameters

A linear predictor for which per parameter significance statistics are available.

OlsTrainer

The IEstimator<TTransformer> for training a linear regression model using ordinary least squares (OLS) for estimating the parameters of the linear regression model.

OlsTrainer.Options

Options for the OlsTrainer.

OneVersusAllModelParameters

Contains the model parameters and prediction functions for OneVersusAllTrainer.

OneVersusAllTrainer
OnlineGradientDescentTrainer

The IEstimator<TTransformer> for training a linear regression model using Online Gradient Descent (OGD) for estimating the parameters of the linear regression model.

OnlineGradientDescentTrainer.Options

Options for the OnlineGradientDescentTrainer.

OnlineLinearOptions

Arguments class for online linear trainers.

OnlineLinearTrainer<TTransformer,TModel>

Base class for online linear trainers. Online trainers can be updated incrementally with additional data.

PairwiseCouplingModelParameters

Contains the model parameters and prediction functions for the PairwiseCouplingTrainer.

PairwiseCouplingTrainer

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 FastTree Binary Classification 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 a one-versus-all classification model.

PcaModelParameters

PCA is a dimensionality-reduction transform which computes the projection of the feature vector onto a low-rank subspace.

PoissonLoss

Poisson Loss.

PoissonRegressionModelParameters

The model parameters class for Poisson Regression.

PriorModelParameters
PriorTrainer

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

RandomizedPcaTrainer

This trainer trains an approximate PCA using Randomized SVD algorithm Reference: https://web.stanford.edu/group/mmds/slides2010/Martinsson.pdf

RandomizedPcaTrainer.Options
RegressionModelParameters
SdcaBinaryTrainerBase<TModelParameters>.BinaryOptionsBase

Options base class for binary SDCA trainers.

SdcaBinaryTrainerBase<TModelParameters>

SDCA is a general training algorithm for (generalized) linear models such as support vector machine, linear regression, logistic regression, and so on. SDCA binary classification trainer family includes several sealed members: (1) SdcaNonCalibratedBinaryTrainer supports general loss functions and returns LinearBinaryModelParameters. (2) SdcaLogisticRegressionBinaryTrainer essentially trains a regularized logistic regression model. Because logistic regression naturally provide probability output, this generated model's type is CalibratedModelParametersBase<TSubModel,TCalibrator>. where TSubModel is LinearBinaryModelParameters and TCalibrator is PlattCalibrator.

SdcaLogisticRegressionBinaryTrainer

The IEstimator<TTransformer> for training a binary logistic regression classification model using the stochastic dual coordinate ascent method. The trained model is calibrated and can produce probability by feeding the output value of the linear function to a PlattCalibrator.

SdcaLogisticRegressionBinaryTrainer.Options

Options for the SdcaLogisticRegressionBinaryTrainer.

SdcaMaximumEntropyMulticlassTrainer

The IEstimator<TTransformer> for training a maximum entropy classification model using the stochastic dual coordinate ascent method. The trained model MaximumEntropyModelParameters produces probabilities of classes.

SdcaMaximumEntropyMulticlassTrainer.Options
SdcaMulticlassTrainerBase<TModel>.MulticlassOptions

Options for the SdcaMulticlassTrainerBase<TModel>.

SdcaMulticlassTrainerBase<TModel>

The IEstimator<TTransformer> for training a multiclass linear classification model using the stochastic dual coordinate ascent method.

SdcaNonCalibratedBinaryTrainer

The IEstimator<TTransformer> for training a binary logistic regression classification model using the stochastic dual coordinate ascent method.

SdcaNonCalibratedBinaryTrainer.Options

Options for the SdcaNonCalibratedBinaryTrainer.

SdcaNonCalibratedMulticlassTrainer

The IEstimator<TTransformer> for training a multiclass linear model using the stochastic dual coordinate ascent method. The trained model LinearMulticlassModelParameters does not produces probabilities of classes, but we can still make decisions by choosing the class associated with the largest score.

SdcaNonCalibratedMulticlassTrainer.Options
SdcaRegressionTrainer

The IEstimator<TTransformer> for training a regression model using the stochastic dual coordinate ascent method.

SdcaRegressionTrainer.Options

Options for the SdcaRegressionTrainer.

SdcaTrainerBase<TOptions,TTransformer,TModel>.OptionsBase

Options for the SDCA-based trainers.

SdcaTrainerBase<TOptions,TTransformer,TModel>
SgdBinaryTrainerBase<TModel>.OptionsBase
SgdBinaryTrainerBase<TModel>
SgdCalibratedTrainer

The IEstimator<TTransformer> for training logistic regression using a parallel stochastic gradient method. The trained model is calibrated and can produce probability by feeding the output value of the linear function to a PlattCalibrator.

SgdCalibratedTrainer.Options

Options for the SgdCalibratedTrainer.

SgdNonCalibratedTrainer

SgdNonCalibratedTrainer can train a linear classification model by minimizing any loss function which implements IClassificationLoss.

SgdNonCalibratedTrainer.Options
SmoothedHingeLoss
SquaredLoss
StochasticTrainerBase<TTransformer,TModel>
SymbolicSgdLogisticRegressionBinaryTrainer

Parallel Stochastic Gradient Descent trainer.

SymbolicSgdLogisticRegressionBinaryTrainer.Options

Advanced options for trainer.

TrainerEstimatorBase<TTransformer,TModel>

This represents a basic class for 'simple trainer'. A 'simple trainer' accepts one feature column and one label column, also optionally a weight column. It produces a 'prediction transformer'.

TrainerEstimatorBaseWithGroupId<TTransformer,TModel>

This represents a basic class for 'simple trainer'. A 'simple trainer' accepts one feature column and one label column, also optionally a weight column. It produces a 'prediction transformer'.

TrainerInputBase

The base class for all trainer inputs.

TrainerInputBaseWithGroupId

The base class for all trainer inputs that support a group column.

TrainerInputBaseWithLabel

The base class for all trainer inputs that support a Label column.

TrainerInputBaseWithWeight

The base class for all trainer inputs that support a weight column.

TweedieLoss

Tweedie loss, based on the log-likelihood of the Tweedie distribution.

UnsupervisedTrainerInputBaseWithWeight

The base class for all unsupervised trainer inputs that support a weight column.

Interfaces

ICalculateFeatureContribution

Allows support for feature contribution calculation by model parameters.

IClassificationLoss
ILossFunction<TOutput,TLabel>
IRegressionLoss
IScalarLoss
ISupportSdcaClassificationLoss
ISupportSdcaLoss

The loss function may know the close-form solution to the optimal dual update Ref: Sec(6.2) of http://jmlr.org/papers/volume14/shalev-shwartz13a/shalev-shwartz13a.pdf

ISupportSdcaRegressionLoss
ITrainerEstimator<TTransformer,TModel>

Interface for the Trainer Estimator.

Enums

KMeansTrainer.InitializationAlgorithm
MatrixFactorizationTrainer.LossFunctionType

Type of loss function.