Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

C# .Net interface #763

Closed
mdabros opened this issue Aug 1, 2017 · 10 comments
Closed

C# .Net interface #763

mdabros opened this issue Aug 1, 2017 · 10 comments

Comments

@mdabros
Copy link

mdabros commented Aug 1, 2017

Are there any plans for a C# .net interface similar to what is availible for Python and R? For example:
https://github.com/Microsoft/LightGBM/blob/master/python-package/lightgbm/sklearn.py

I can see a related issue (#74) was closed earlier this year. However, the resulting nuget package only seem to package the command line version of lightGBM.

@guolinke
Copy link
Collaborator

guolinke commented Aug 3, 2017

It seems c# doesn't have the native Matrices support (like the numpy / pandas in python).
As a result, the C# interfaces is not easier to be used, compared with raw cpp version.
So we provide the dll in nuget, you can wrap your interface based that dll.

BTW, it seems @ycdoit had done some works for the c# interfaces. @ycdoit can you share some details ?

@mdabros
Copy link
Author

mdabros commented Aug 11, 2017

I am interested in providing a lightGBM learner/model as a more efficient alternative to my own gradient boost implementation in SharpLearning. With the primary goal of making machine learning more accessible in C#.

My hope was to have a stand-alone C# interface for lightGBM (+ native dll) in a nuget package and then use that package in SharpLearning. If there are currently no plans to develop a C# interface, I would be interested in contributing to get this started. @ycdoit, let me know if you already have something working.

Of course it would be better with an official lightGBM C# release from the Microsoft team. The Microsoft CNTK team has recently announced they are working on full C# support (training/evaluation) for deep learning (microsoft/CNTK#2194). So something similar from the lightGBM team would be great :-).

@JimSEOW
Copy link

JimSEOW commented Aug 11, 2017

@mdabros consolidation! Great job!

@stefanks
Copy link

stefanks commented Sep 5, 2017

Also very interested in this

@fstandhartinger
Copy link

fstandhartinger commented Mar 4, 2018

Hi there,

I have created a .NET wrapper for LightGBM (including GPU support) based on the executable version of LightGBM.

If interrested, check it out: LightGbmDotNet

But of course a proper .NET wrapper for LightGBM, maintained by the original team would be even better.

Best regards

Florian

@mdabros
Copy link
Author

mdabros commented Mar 5, 2018

Hi @fstandhartinger

Thanks for developing a usable C# wrapper for the LightGBM.exe based nuget package. This is definitely a step in the right direction, and I think this will help make LightGBM more accessible to the .net community.

For my specific use-case, including it as a more efficient an alternative to the gradient boost implementation in SharpLearning, I would prefer a solution where the native dll is wrapped directly using pinvoke or similar. As you mention in #74 , this requires considerable effort and probably also requires the help of the LightGBM developers.

I will leave this issue open for the development of a .net wrapper, where the native dll is wrapped directly.

Best regards
Mads

@fstandhartinger
Copy link

fstandhartinger commented Mar 5, 2018

@guolinke:
Could you please clarify what you mean with C# missing native Matrices support?
I consider writing a C# dll wrapper (or upgrade my current exe based wrapper).
Aren't muti dimensional floating point arrays enough for dealing with the LightGBM interface?
If not, maybe external libraries like Math.NET can help to fill the gap here.
Thanks!

@ttustonic
Copy link

ttustonic commented Mar 27, 2018

Here's another one: https://github.com/ttustonic/LightGBMSharp
It is interop library for the original LightGBM dll and has a few classes to mimic Python wrapper.
It has no dependencies outside .Net, and only uses MathNet.Numerics for the example.

Cheers, Tom

@guolinke
Copy link
Collaborator

refer to dotnet/machinelearning#392
LightGBM will be in ML.Net soon.

@StrikerRUS
Copy link
Collaborator

@guolinke Can we close this issue, since LightGBM is in ML.NET now?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

7 participants