Manually aggregate tree predictions for LightGBMRegressor to match the model’s predict method
I’m using LightGBM for a regression problem and I’m trying to manually replicate the prediction process of the LGBMRegressor to understand how the model works internally (so when it will work I wont to calculate the median instead of the mean). However, my manual aggregation of the tree predictions doesn’t match the result from the predict method. Here’s what I’ve tried so far:
Manually aggregate tree predictions for LightGBMRegressor to match the model’s predict method
I’m using LightGBM for a regression problem and I’m trying to manually replicate the prediction process of the LGBMRegressor to understand how the model works internally (so when it will work I wont to calculate the median instead of the mean). However, my manual aggregation of the tree predictions doesn’t match the result from the predict method. Here’s what I’ve tried so far: