Suppose a machine learning model, such as LightGBM's LGBMRegressor
, has an attribute best_iteration_
. How is this attribute accessible after calling the fit
method, whereby sklearn's Pipeline
and MultiOutputRegressor
were utilized?
For Pipeline
I've tried named_steps
:
foo.named_steps['reg']
which returns the following object sklearn.multioutput.MultiOutputRegressor.
Then, I've tried .estimators_
:
foo.named_steps['reg'].estimators_
which returns a list. However, the list contains the initial parameters that were supplied to the model.
Could someone please explain the ideal way to access a model's attributes?