- 授权协议: MIT
- 开发语言: C#
- 操作系统: 跨平台
- 软件首页: https://www.microsoft.com/net/learn/apps/machine-learning-and-ai/ml-dotnet
- 软件文档: https://github.com/dotnet/machinelearning
- 官方下载: https://github.com/dotnet/machinelearning
软件介绍
ML.NET 是一个跨平台的开源机器学习框架,旨在让 .NET 开发者更快上手机器学习。
ML.NET 最初由微软研究院开发,在过去十年中已成长为一个重要的框架,并用于微软的许多产品组,如 Windows、Bing、PowerPoint、Excel 等等。
ML.NET 允许 .NET 开发者开发他们自己的模型,并将自定义 ML 注入到他们的应用程序中。他们无需开发或调整机器学习模型的专业知识,一切都可在 .NET 中搞定。
示例:
下面是一个训练模型的代码示例:
var pipeline = new LearningPipeline();
pipeline.Add(new TextLoader<SentimentData>(dataPath, separator: ","));
pipeline.Add(new TextFeaturizer("Features", "SentimentText"));
pipeline.Add(new FastTreeBinaryClassifier());
var model = pipeline.Train<SentimentData, SentimentPrediction>();从模型中我们可以做出推论(预测):
SentimentData data = new SentimentData
{
SentimentText = "Today is a great day!"
};
SentimentPrediction prediction = model.Predict(data);
Console.WriteLine("prediction: " + prediction.Sentiment);
