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.
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
.
MIT
true
to the constructor of LightGbm class. If it crashes you might need to install the OpenCL implementation from NVIDIA (CUDA).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