You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Exposing the tree for multiclass classification #6370
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.
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.
@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?
Activity
michaelgsharp commentedon Nov 28, 2022
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 commentedon Nov 30, 2022
@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 commentedon Mar 29, 2023
Hi @sp44rk,
Thanks for this issue. We've added this to our backlog.
matouskozak commentedon Oct 23, 2026
Triage:
I see two possible workarounds are:
TrainedTreeEnsemble. You would need to combine their predictions yourself.Hope this helps a bit, feel free to reach out if you still have issues.