fstandhartinger / LightGbmDotNet

A .NET wrapper for the LightGBM machine learning library
MIT License
11 stars 2 forks source link
csharp dotnet gradient-boosting learning lightgbm machine machine-learning

LightGbmDotNet

A .NET wrapper for the LightGBM machine learning library, including GPU support.

LightGBM is one of the leading Gradient Boosting solutions, provided open source by Microsoft.

Usage (C#):

using(var lightGbm = new LightGbm())
{
   lightGbm.Train(trainingData); //optionally pass parameters
   var predictions = lightGbm.Predict(predictionData); //returns an array of predictions
   lightGbm.SaveModel("somefile.txt"); //for later reuse of the trained machine learning model without retraining
}

Where both trainingData and predictionData are of type IEnumerable<IEnumerable<double>> representing rows of double values.

First column in trainingData is the label column (the value that you want to predict). Omit this column in predictionData.

License

MIT

Notes

Alternatives

Not tested myself so far:

Both libraries work using in process / in memory data transfer to / from the native machine learning libraries, which should lead to superior performance compared to LightGbmDotNet