siboehm / lleaves

Compiler for LightGBM gradient-boosted trees, based on LLVM. Speeds up prediction by ≥10x.
https://lleaves.readthedocs.io/en/latest/
MIT License
333 stars 28 forks source link

Is it possible to pass the `num_iteration` parameter to the `predict` function? #40

Closed fuyw closed 1 year ago

fuyw commented 1 year ago

Hello Simon,

I want to ask that can we pass the num_iteration parameter to the predict function as in the origin LGBM API:

predict(data, start_iteration=0, num_iteration=None, raw_score=False, pred_leaf=False, pred_contrib=False, data_has_header=False, validate_features=False, **kwargs)
siboehm commented 1 year ago

Why did you close it? Did you not end up needing the feature after all?

fuyw commented 1 year ago

Hi Simon, I found that I can set the num_iteration parameter when I save the model instead. So I closed the issue

lgb.save(booster, filename, num_iteration = NULL)