ML.NET provides state-of-the-art machine learning (ML) algorithms, transforms, and components, and powers ML pipelines in many Microsoft products. Developed and used internally at Microsoft for over 5 years, the goal is to make ML.NET useful for all developers, data scientists, and information workers and helpful in all products, services, and devices.
Coming soon
You can install ML.NET NuGet from the CLI using:
dotnet add package Microsoft.ML
From package manager:
Install-Package Microsoft.ML
For an example of getting started with .NET Core, see here.
To build ML.NET from source go to developers guide
Simple snippet to train a model for sentiment classification (See the complete sample here):
var pipeline = new LearningPipeline()
.Add(new TextLoader<SentimentData>(dataPath, separator: ",")
.Add(new TextFeaturizer("Features", "SentimentText")
.Add(new FastTreeBinaryClassifier()
Add(new PredictedLabelColumnOriginalValueConverter(PredictedLabelColumn = "PredictedLabel"});
var model = pipeline.Train<SentimentData, SentimentPrediction>();
Infer the trained model for predictions:
SentimentData data = new SentimentData
{
SentimentText = "Today is a great day!"
};
SentimentPrediction prediction = model.Predict(data);
Console.WriteLine("prediction: " + prediction.Sentiment);
This project has adopted the code of conduct defined by the Contributor Covenant to clarify expected behavior in our community. For more information, see the .NET Foundation Code of Conduct.
ML.NET is licensed under the MIT license.
ML.NET is a .NET Foundation project.
There are many .NET related projects on GitHub.
- .NET home repoย - links to 100s of .NET projects, from Microsoft and the community.