cog-imperial / OMLT

Represent trained machine learning models as Pyomo optimization formulations
Other
273 stars 58 forks source link

Linear Tree with Multiple Outputs #161

Open zkilwein opened 3 months ago

zkilwein commented 3 months ago

I have been experimenting with some of the linear tree formulations within OMLT. My use case is a linear tree model with 9 inputs and 12 outputs using LinearTreeGDPFormulation.

I've noticed that n_outputs is hard coded to 1 in LinearTreeDefinition. For representing multi-output models, would the only current strategy be to train each of the 12 outputs separately and create separate OMLT blocks?

bammari commented 3 months ago

@zkilwein Thanks for raising this issue. Yes that is currently the only method for supporting these multioutput trees, however I am working on a rewrite of how we handle trees and ensembles in OMLT.