dotnet / machinelearning

ML.NET is an open source and cross-platform machine learning framework for .NET.
https://dot.net/ml
MIT License
9k stars 1.88k forks source link

Exposing the tree for multiclass classification #6370

Open oberma-schueco opened 1 year ago

oberma-schueco commented 1 year ago

Hey.

We are currently porting our Code from the Accord framework to ML.net and struggle to do so. In the Accord.net framework we are using the C4.5 decision tree algorithm to process our data and so we were looking into multiclass trainers from ML.net.

With Accord.net we have the ability to inspect the trained tree and expose this via text form to the user. Are we able to get the same information with ML.net?

After reading into #4275 we are actively looking into the LightGBM trainer, but I am only able to find the trained tree ensemble for all the other options except the multiclass classification version of LightGBM.

michaelgsharp commented 1 year ago

So you should be able to use the same steps for LightGBM as you do the other tree models. When we use LightGBM after training we actually convert it to the same representation as the other tree models.

@luisquintanilla any other suggestions?

oberma-schueco commented 1 year ago

@michaelgsharp What method are you using exactly? For all the LightGBM extensions there are ModelParameters that expose the tree, except for the multiclass version of it. And that is what we are actually looking into.

Can you explain how you do the conversion? Maybe there is a conversion from multiclass to another method?

luisquintanilla commented 1 year ago

Hi @sp44rk,

Thanks for this issue. We've added this to our backlog.