mdabros / SharpLearning

Machine learning for C# .Net
MIT License
382 stars 84 forks source link
adaboost cross-validation csharp decision-trees deep-learning dotnet ensemble-learning gradient-boosting-machine learning machine machine-learning metrics neural-nets opensource random-forest

Build Status Nuget downloads License

SharpLearning

SharpLearning is an opensource machine learning library for C# .Net. The goal of SharpLearning is to provide .Net developers with easy access to machine learning algorithms and models.

Currently the main focus is supervised learning for classification and regression, while also providing the necesarry tools for optimizing and validating the trained models.

SharpLearning provides a simple high-level interface for machine learning algorithms.
In SharpLearning a machine learning algorithm is refered to as a Learner, and a machine learning model is refered to as a PredictorModel. An example of usage can be seen below:

// Create a random forest learner for classification with 100 trees
var learner = new ClassificationRandomForestLearner(trees: 100);

// learn the model
var model = learner.Learn(observations, targets);

// use the model for predicting new observations
var predictions = model.Predict(testObservations);

// save the model for use with another application
model.Save(() => new StreamWriter("randomforest.xml"));

All machine learning algorithms and models implement the same interface for easy replacement.

Currently SharpLearning supports the following machine learning algorithms and models:

All the machine learning algorithms have sensible default hyperparameters for easy usage. However, several optimization methods are available for hyperparameter tuning:

License

SharpLearning is covered under the terms of the MIT license. You may therefore link to it and use it in both opensource and proprietary software projects.

Documentation

SharpLearning contains xml documentation to help guide the user while using the library.

Code examples and more information about how to use SharpLearning can be found in SharpLearning.Examples

The wiki also contains a set of guides on how to get started:

Installation

The recommended way to get SharpLearning is to use NuGet. The packages are provided and maintained in the public NuGet Gallery. More information can be found in the getting started guide on the wiki

Learner and model packages:

Validation and model selection packages:

Container/IO packages:

Contributing

Contributions are welcome in the following areas:

  1. Add new issues with bug descriptions or feature suggestions.
  2. Add more examples to SharpLearning.Examples.
  3. Solve existing issues by forking SharpLearning and creating a pull request.

When contributing, please follow the contribution guide.