Microsoft.ML Namespace

The main namespace for ML.NET. Contains application and operation contexts, transformer and trainer catalogs, and components for data view processing.

Classes

AlexNetExtension

This is an extension method to be used with the DnnImageFeaturizerEstimator in order to use a pretrained AlexNet model. The NuGet containing this extension is also guaranteed to include the binary model file.

AnomalyDetectionCatalog

Class used by MLContext to create instances of anomaly detection components, such as trainers and evaluators.

AnomalyDetectionCatalog.AnomalyDetectionTrainers

Class used by MLContext to create instances of anomaly detection trainers.

BinaryClassificationCatalog

Class used by MLContext to create instances of binary classification components, such as trainers and calibrators.

BinaryClassificationCatalog.BinaryClassificationTrainers

Class used by MLContext to create instances of binary classification trainers.

BinaryClassificationCatalog.CalibratorsCatalog

Class used by MLContext to create instances of binary classification calibrators.

BinaryLoaderSaverCatalog

Collection of extension methods for the DataOperationsCatalog to create instances of components to save and read IDataView objects to and from a high-performance binary format.

CategoricalCatalog

Collection of extension methods for TransformsCatalog.CategoricalTransforms to create categorical transformer components.

ClusteringCatalog

Class used by MLContext to create instances of clustering components, such as trainers.

ClusteringCatalog.ClusteringTrainers

Class used by MLContext to create instances of clustering trainers.

ConversionsCatalog

Collection of extension methods for TransformsCatalog to create instances of key to binary vector mapping transformer components

ConversionsExtensionsCatalog

Collection of extension methods for TransformsCatalog to create instances of data conversion and mapping transformer components.

CustomMappingCatalog

Class containing an extension method for TransformsCatalog to create instances of user-defined one-to-one row mapping transformer components.

DatabaseLoaderCatalog

Collection of extension methods for the DataOperationsCatalog to read from databases.

DataLoaderExtensions

Class used to load data from one or more files.

DataOperationsCatalog

Class used to create components that operate on data, but are not part of the model training pipeline. Includes components to load, save, cache, filter, shuffle, and split data.

DataViewRow

A logical row of data. May be a row of an IDataView or a stand-alone row.

DataViewRowCursor

Class used to cursor through rows of an IDataView.

DataViewSchema

Represents the schema of an IDataView or an DataViewRow. The schema is a collection of DataViewSchema.Column.

DataViewSchema.Annotations

The schema annotations of one DataViewSchema.Column.

DataViewSchema.Annotations.Builder

Class containing operations to build an DataViewSchema.Annotations.

DataViewSchema.Builder

Class containing operations to build a DataViewSchema.

DebuggerExtensions

Class used to create instances of preview objects for debugging. Note: this class and all methods should only be used for debugging and not in production code.

DnnCatalog

The DnnTransformer is used in following two scenarios.

  1. Scoring with pretrained TensorFlow model: In this mode, the transform extracts hidden layers' values from a pre-trained Tensorflow model and uses outputs as features in ML.Net pipeline.
  2. Retraining of TensorFlow model: In this mode, the transform retrains a TensorFlow model using the user data passed through ML.Net pipeline. Once the model is trained, it's outputs can be used as features for scoring.
ExplainabilityCatalog

Collection of extension methods for TransformsCatalog to create instances of model explainability components.

ExtensionBaseAttribute

The base attribute type for all attributes used for extensibility purposes.

ExtensionsCatalog

Collection of extension methods for TransformsCatalog to create instances of missing value transformer components.

FactorizationMachineExtensions

Collection of extension methods for the BinaryClassificationCatalog to create instances of field aware factorization trainer components.

FeatureSelectionCatalog

Collection of extension methods for TransformsCatalog to create instances of feature selection transformer components.

ForecastingCatalog

Class used by MLContext to create instances of forecasting components.

ForecastingCatalog.Forecasters

Class used by MLContext to create instances of forecasting trainers.

ImageEstimatorsCatalog

Collection of extension methods for TransformsCatalog to create instances of image processing transformer components.

InputOutputColumnPair

Specifies input and output column names for transformer components that operate on multiple columns.

KernelExpansionCatalog

Collection of extension methods for TransformsCatalog to create instances of kernel method feature engineering transformer components.

KMeansClusteringExtensions

Collection of extension methods for the ClusteringCatalog.ClusteringTrainers to create instances of KMeans trainers.

LearningPipelineExtensions

Extension methods that allow chaining of estimator and transformer pipelines.

LightGbmExtensions

Collection of extension methods for the RegressionCatalog.RegressionTrainers, BinaryClassificationCatalog.BinaryClassificationTrainers, RankingCatalog.RankingTrainers, and MulticlassClassificationCatalog.MulticlassClassificationTrainers catalogs.

LoggingEventArgs

Provides data for the Log event.

MklComponentsCatalog

Collection of extension methods for RegressionCatalog.RegressionTrainers, BinaryClassificationCatalog.BinaryClassificationTrainers, and TransformsCatalog to create MKL (Math Kernel Library) trainer and transform components.

MLContext

The common context for all ML.NET operations. Once instantiated by the user, it provides a way to create components for data preparation, feature enginering, training, prediction, model evaluation. It also allows logging, execution control, and the ability set repeatable random numbers.

ModelOperationsCatalog

Class used by MLContext to save and load trained models.

ModelSaveContext

Convenience context object for saving models to a repository, for implementors of ICanSaveModel.

MulticlassClassificationCatalog

Class used by MLContext to create instances of multiclass classification components, such as trainers.

MulticlassClassificationCatalog.MulticlassClassificationTrainers

Class used by MLContext to create instances of multiclass classification trainers.

NormalizationCatalog

Collection of extension methods for TransformsCatalog to create instances of numerical normalization components.

OnnxCatalog
OnnxExportExtensions
PcaCatalog

Collection of extension methods used by the AnomalyDetectionCatalog.AnomalyDetectionTrainers, and TransformsCatalog catalogs to create instances of Principal Component Analysis (PCA) components.

PermutationFeatureImportanceExtensions

Collection of extension methods used by RegressionCatalog, BinaryClassificationCatalog, MulticlassClassificationCatalog, and RankingCatalog to create instances of permutation feature importance components.

PredictionEngine<TSrc,TDst>

Class for making single predictions on a previously trained model (and preceding transform pipeline).

PredictionEngineBase<TSrc,TDst>

Base class for making single predictions on a previously trained model (and the preceding transform pipeline).

RankingCatalog

Class used by MLContext to create instances of ranking components, such as trainers and evaluators.

RankingCatalog.RankingTrainers

Class used by MLContext to create instances of ranking trainers.

RecommendationCatalog

The central catalog for recommendation trainers and tasks.

RecommendationCatalog.RecommendationTrainers
RecommenderCatalog
RegressionCatalog

Class used by MLContext to create instances of regression components, such as trainers and evaluators.

RegressionCatalog.RegressionTrainers

Class used by MLContext to create instances of regression trainers.

ResNet101Extension

This is an extension method to be used with the DnnImageFeaturizerEstimator in order to use a pretrained ResNet101 model. The NuGet containing this extension is also guaranteed to include the binary model file.

ResNet18Extension

This is an extension method to be used with the DnnImageFeaturizerEstimator in order to use a pretrained ResNet18 model. The NuGet containing this extension is also guaranteed to include the binary model file.

ResNet50Extension

This is an extension method to be used with the DnnImageFeaturizerEstimator in order to use a pretrained ResNet50 model. The NuGet containing this extension is also guaranteed to include the binary model file.

SchemaShape

A set of 'requirements' to the incoming schema, as well as a set of 'promises' of the outgoing schema. This is more relaxed than the proper DataViewSchema, since it's only a subset of the columns, and also since it doesn't specify exact DataViewType's for vectors and keys.

StandardTrainersCatalog

Collection of extension methods for RegressionCatalog.RegressionTrainers, BinaryClassificationCatalog.BinaryClassificationTrainers, and MulticlassClassificationCatalog.MulticlassClassificationTrainers to create instances of trainer components.

TensorflowCatalog

The TensorFlowTransformer is used in following two scenarios.

  1. Scoring with pretrained TensorFlow model: In this mode, the transform extracts hidden layers' values from a pre-trained Tensorflow model and uses outputs as features in ML.Net pipeline.
  2. Retraining of TensorFlow model: In this mode, the transform retrains a TensorFlow model using the user data passed through ML.Net pipeline. Once the model is trained, it's outputs can be used as features for scoring.
TextCatalog

Collection of extension methods for the TransformsCatalog.

TextLoaderSaverCatalog

Collection of extension methods for the DataOperationsCatalog to read from delimited text files such as csv and tsv.

TimeSeriesCatalog
TrainCatalogBase

Base class for the trainer catalogs.

TrainCatalogBase.CatalogInstantiatorBase

Subclasses of Microsoft.ML.TrainContext will provide little "extension method" hookable objects (for example, something like Trainers). User code will only interact with these objects by invoking the extension methods. The actual component code can work through Microsoft.ML.Data.CatalogUtils to get more "hidden" information from this object, for example, the environment.

TrainCatalogBase.CrossValidationResult<T>

Results of running cross-validation.

TrainerInfo

Characteristics of a trainer. Exposed via the Info property of each trainer.

TransformExtensionsCatalog

Collection of extension methods for TransformsCatalog to create instances of transform components that manipulate columns.

TransformsCatalog

Class used by MLContext to create instances of transform components.

TransformsCatalog.CategoricalTransforms

Class used by MLContext to create instances of categorical data transform components.

TransformsCatalog.ConversionTransforms

Class used by MLContext to create instances of type conversion data transform components.

TransformsCatalog.FeatureSelectionTransforms

Class used by MLContext to create instances of feature selection transform components.

TransformsCatalog.TextTransforms

Class used by MLContext to create instances of text data transform components.

TreeExtensions

Collection of extension methods used by RegressionCatalog, BinaryClassificationCatalog, MulticlassClassificationCatalog, and RankingCatalog to create instances of decision tree trainers.

Structs

DataOperationsCatalog.TrainTestData

A pair of datasets, for the train and test set.

DataViewSchema.Column

This class describes one column in the particular schema.

DataViewSchema.DetachedColumn

This class represents the schema of one column of a data view, without an attachment to a particular DataViewSchema.

SchemaShape.Column

Interfaces

ICanSaveModel

For saving a model into a repository. Classes implementing ICanSaveModel should do an explicit implementation of Save(ModelSaveContext). Classes inheriting ICanSaveModel from a base class should overwrite the function invoked by Save(ModelSaveContext) in that base class, if there is one.

IDataLoader<TSource>

The 'data loader' takes a certain kind of input and turns it into an IDataView.

IDataLoaderEstimator<TSource,TLoader>

Sometimes we need to 'fit' an IDataLoader<TSource>. A DataLoader estimator is the object that does it.

IDataView

The input and output of Query Operators (Transforms). This is the fundamental data pipeline type, comparable to IEnumerable<T> for LINQ.

IEstimator<TTransformer>

The estimator (in Spark terminology) is an 'untrained transformer'. It needs to 'fit' on the data to manufacture a transformer. It also provides the 'schema propagation' like transformers do, but over SchemaShape instead of DataViewSchema.

IPredictionTransformer<TModel>

An interface for all the transformer that can transform data based on the Microsoft.ML.IPredictor field. The implemendations of this interface either have no feature column, or have more than one feature column, and cannot implement the ISingleFeaturePredictionTransformer<TModel>, which most of the ML.Net tranformer implement.

ISingleFeaturePredictionTransformer<TModel>

An ISingleFeaturePredictionTransformer contains the name of the FeatureColumnName and its type, FeatureColumnType. Implementations of this interface, have the ability to score the data of an input IDataView through the Transform(IDataView)

ITransformer

The transformer is a component that transforms data. It also supports 'schema propagation' to answer the question of 'how will the data with this schema look, after you transform it?'.

Enums

SchemaShape.Column.VectorKind

Delegates

ValueGetter<TValue>

Delegate type to get a value. This can be used for efficient access to data in a DataViewRow or DataViewRowCursor.