MLContext Class
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Represents the common context for all ML.NET operations.
public sealed class MLContext
public sealed class MLContext : Microsoft.ML.Runtime.IHostEnvironment
type MLContext = class
interface IHostEnvironment
interface IChannelProvider
interface IExceptionContext
interface IProgressChannelProvider
Public NotInheritable Class MLContext
Public NotInheritable Class MLContext
Implements IHostEnvironment
- Inheritance
-
MLContext
- Implements
Once instantiated by the user, this class provides a way to create components for data preparation, feature engineering, training, prediction, and model evaluation. It also allows logging, execution control, and the ability to set repeatable random numbers.
MLContext(Nullable<Int32>) |
Create the ML context. |
Anomaly |
Gets the trainers and tasks specific to anomaly detection problems. |
Binary |
Gets the trainers and tasks specific to binary classification problems. |
Clustering |
Gets the trainers and tasks specific to clustering problems. |
Component |
Gets the catalog of components that will be used for model loading. |
Data |
Gets the data loading and saving operations. |
Fallback |
Gets or sets a value that indicates whether the CPU will be used if the task couldn't run on GPU. |
Forecasting |
Gets the trainers and tasks specific to forecasting problems. |
Gpu |
Gets or sets the GPU device ID to run execution on, |
Model |
Gets the operations with trained models. |
Multiclass |
Gets the trainers and tasks specific to multiclass classification problems. |
Ranking |
Gets the trainers and tasks specific to ranking problems. |
Regression |
Gets the trainers and tasks specific to regression problems. |
Temp |
Gets or sets the location for the temp files created by ML.NET. |
Transforms |
Gets the data processing operations. |
Get |
|
Remove |
|
Set |
|
Try |
|
Try |
Log |
Represents the callback method that will handle the log messages. |
Auto(MLContext) |
Returns a catalog of all possible AutoML operations. |
Cancel |
Stop the execution of pipeline in MLContext |
Recommendation(MLContext) |
Trainers and tasks specific to recommendation problems. |
Get |
|
Set |
Product | Versions |
---|---|
ML.NET | 1.0.0, 1.1.0, 1.2.0, 1.3.1, 1.4.0, 1.5.0, 1.6.0, 1.7.0, 2.0.0, 3.0.0, Preview, 4.0.0 |