https://github.com/littlelittlecloud/auto-machinelearning
Provides easy API to create and train sweepable pipeline for ML.Net over a group of pre-defined paramaters and trainers
https://github.com/littlelittlecloud/auto-machinelearning
automated-machine-learning automl machine-learning machinelearning-csharp mlnet
Last synced: 4 days ago
JSON representation
Provides easy API to create and train sweepable pipeline for ML.Net over a group of pre-defined paramaters and trainers
- Host: GitHub
- URL: https://github.com/littlelittlecloud/auto-machinelearning
- Owner: LittleLittleCloud
- License: mit
- Created: 2020-04-17T00:13:00.000Z (about 5 years ago)
- Default Branch: master
- Last Pushed: 2022-12-08T10:30:20.000Z (over 2 years ago)
- Last Synced: 2025-05-05T08:41:07.232Z (about 2 months ago)
- Topics: automated-machine-learning, automl, machine-learning, machinelearning-csharp, mlnet
- Language: C#
- Homepage:
- Size: 2.18 MB
- Stars: 8
- Watchers: 2
- Forks: 1
- Open Issues: 4
-
Metadata Files:
- Readme: README.md
- Contributing: CONTRIBUTING.md
- License: LICENSE.TXT
Awesome Lists containing this project
README
## **MLNet.AutoPipeline**: AutoML for [ML.NET](https://dotnet.microsoft.com/apps/machinelearning-ai/ml-dotnet)
**ML.Net AutoPipeline** is a set of packages build on top of ML.Net that provide AutoML feature. It is aimed to solve the two following problems that vastly exists in Machinelearning:
- Given a ML pipeline, find the best hyper-parameters for its transformers or trainers.
- Given a dataset and a ML task, find the best pipeline for solving this task.[](https://dev.azure.com/xiaoyuz0315/BigMiao/_build/latest?definitionId=3&branchName=master)  [](https://opensource.org/licenses/MIT)
## Try it on Binder
[](https://mybinder.org/v2/gh/LittleLittleCloud/MLNet-AutoPipeline-Examples/master)## Quick Start
First, add `MLNet.AutoPipeline` to your project. You can get those packages from our [nightly build](#Installation).
```xml
```
Then create a `SweepablePipeline` using `AutoPipelineCatalog` API. `SweepablePipeline` is similar to the concept of [`EstimatorChain`](https://docs.microsoft.com/en-us/dotnet/api/microsoft.ml.data.estimatorchain-1?view=ml-dotnet) in ML.Net. And it will fine-tune hyperparameters by sweeping over a group of pre-defined parameters during training.```csharp
var context = new MLContext();
var sweepablePipeline = context.Transforms.Conversion.MapValueToKey("species", "species")
// here we use Iris dataset as example.
.Append(context.Transforms.Concatenate("features", new string[] { "sepal_length", "sepal_width", "petal_length", "petal_width" }))
// create a sweepable LbfgsMaximumEntropy trainer
.Append(context.AutoML().MultiClassification.LbfgsMaximumEntropy("species", "features"));
```Then create an `Experiment` to sweep over `sweepablePipeline` to find the best pipeline and hyperparameter.
```csharp
var experimentOption = new Experiment.Option()
{
EvaluateFunction = (MLContext context, IDataView data) =>
{
return context.MulticlassClassification.Evaluate(data, "iris").MicroAccuracy;
}, // Use Micro Accuracy as evaluate metric.
};var experiment = context.AutoML().CreateExperiment(estimatorChain, experimentOption)
var result = await experiment.TrainAsync(split.TrainSet); // train experiment.
```## Examples
Please visit [MLNet-AutoPipeline-Example](https://github.com/LittleLittleCloud/MLNet-AutoPipeline-Examples) for MLNet.AutoPipeline examples.## Installation
This project is still under developing, so no released package is available yet. However, you can get the prereleased version below.
|[auto-pipeline](https://dev.azure.com/xiaoyuz0315/BigMiao/_packaging?_a=feed&feed=MLNet-Auto-Pipeline%40Prerelease)|Pre-released|
|-|-|
|MLNet.AutoPipeline|[](https://dev.azure.com/xiaoyuz0315/BigMiao/_packaging?_a=package&feed=360eccf9-f423-4798-85f2-57d25eecbd49%40c1004200-b0de-4d5b-8208-7464f565e1a8&package=f14318be-ef42-4f8a-8930-76a801345968&preferRelease=true)|
|MLNet.Sweeper|[](https://dev.azure.com/xiaoyuz0315/BigMiao/_packaging?_a=package&feed=360eccf9-f423-4798-85f2-57d25eecbd49%40c1004200-b0de-4d5b-8208-7464f565e1a8&package=681d6c5b-20bd-4794-bbec-8fc8a54c6ea6&preferRelease=true)|
|MLNet.Expert|[](https://dev.azure.com/xiaoyuz0315/BigMiao/_packaging?_a=package&feed=360eccf9-f423-4798-85f2-57d25eecbd49&package=7c3ea9b1-81eb-4ea6-8c9f-35fcbd890f45&preferRelease=true)|## Contributing
We welcome contributions! Please see our [contribution guide](CONTRIBUTING.md)