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:
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.
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:
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:
Contributions are welcome in the following areas:
When contributing, please follow the contribution guide.