Skip to content
Merged
Changes from 4 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
56 changes: 37 additions & 19 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,30 +1,52 @@
# Machine Learning in .NET
# Machine Learning for .NET

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.
[ML.NET](https://www.microsoft.com/net/learn/apps/machine-learning-and-ai/ml-dotnet) 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.

### Build Status
ML.NET runs on Windows, Linux, and macOS - any platform where 64 bit [.NET Core](https://github.com/dotnet/core) or later is available.

Coming soon
With ML.NET you can use the latest ML algorithms to create and evaluate a model from training data. Once you have a model, you can add to your app just a few lines of .NET code to make predictions from the model.

### Installation
## Installation

You can install ML.NET NuGet from the CLI using:
The current release is 0.1. Check out the [release notes](https://github.com/dotnet/machinelearning/blob/master/Documentation/release-notes/0.1/release-0.1.md).

First ensure you have installed [.NET Core 2.0](https://www.microsoft.com/net/learn/get-started) or later. ML.NET also works on the .NET Framework. Note that ML.NET currently must run in a 64 bit process.

Once you have an app, you can install ML.NET NuGet from the .NET Core CLI using:
```
dotnet add package Microsoft.ML
```

From package manager:
or from the package manager:
```
Install-Package Microsoft.ML
```
For an example of getting started with .NET Core, see [here](https://www.microsoft.com/net/learn/get-started).

### Building
To build ML.NET from source go to [developers guide](https://github.com/dotnet/machinelearning/blob/master/Documentation/project-docs/developer-guide.md)
Or alternatively you can add the Microsoft.ML package from within Visual Studio's NuGet package manager.

## Building

To build ML.NET from source please visit our [developers guide.](https://github.com/dotnet/machinelearning/blob/master/Documentation/project-docs/developer-guide.md)

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

should this be: developers guide.

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can you clarify?

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

just a nit. dot does not need the hyperlink and the link also can be relative.

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Dot vanishes if I move it

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Made link relative.


Live build status is coming soon.

### Example
## Contributing

We welcome contributions! Please review our [contribution guide](https://github.com/dotnet/machinelearning/blob/master/CONTRIBUTING.md).

## Community

Please join our community on Gitter [![Join the chat at https://gitter.im/dotnet/corefx](https://badges.gitter.im/Join%20Chat.svg)](https://gitter.im/dotnet/?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)

This project has adopted the code of conduct defined by the [Contributor Covenant](http://contributor-covenant.org/) to clarify expected behavior in our community.
For more information, see the [.NET Foundation Code of Conduct](https://dotnetfoundation.org/code-of-conduct).

## Examples

Imagine you want to predict the sale price of a house. Given a large dataset of information about other houses, including their sale prices, you can use ML.NET to create and evaluate a model. Then, you can deploy the model with your app.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

should we instead just have link to the samples folder? not sure if two different examples here is helpful.

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The only purpose of examples in the readme are to illustrate why folks should use ML.NET. The samples are to teach/educate. Perhaps not quite the same? I'm happy to do it any way you guys think.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I agree, I think it may be more helpful to put the same paragraph but regarding Sentiment for which we have the code snippet rather than house price.

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed


Here's a different example, with code, to train a model to predict sentiment from text samples. (You can see the complete sample [here](https://github.com/dotnet/machinelearning/blob/master/test/Microsoft.ML.Tests/Scenarios/Scenario3_SentimentPrediction.cs)):

Simple snippet to train a model for sentiment classification (See the complete sample [here](https://github.com/dotnet/machinelearning/blob/master/test/Microsoft.ML.Tests/Scenarios/Scenario3_SentimentPrediction.cs)):
```C#
var pipeline = new LearningPipeline();
pipeline.Add(new TextLoader<SentimentData>(dataPath, separator: ","));
Expand All @@ -33,7 +55,7 @@ pipeline.Add(new FastTreeBinaryClassifier());
var model = pipeline.Train<SentimentData, SentimentPrediction>();
```

Infer the trained model for predictions:
Now from the model we can make inferences (predictions):

```C#
SentimentData data = new SentimentData
Expand All @@ -46,11 +68,6 @@ SentimentPrediction prediction = model.Predict(data);
Console.WriteLine("prediction: " + prediction.Sentiment);
```

### Code of Conduct

This project has adopted the code of conduct defined by the [Contributor Covenant](http://contributor-covenant.org/) to clarify expected behavior in our community.
For more information, see the [.NET Foundation Code of Conduct](https://dotnetfoundation.org/code-of-conduct).

## License

ML.NET is licensed under the [MIT license](LICENSE).
Expand All @@ -61,4 +78,5 @@ ML.NET is a [.NET Foundation](http://www.dotnetfoundation.org/projects) project.

There are many .NET related projects on GitHub.

- [.NET home repo](https://github.com/Microsoft/dotnet) - links to 100s of .NET projects, from Microsoft and the community.
- [.NET home repo](https://github.com/Microsoft/dotnet) - links to 100s of .NET projects, from Microsoft and the community.