Closed
Description
Describe the workflow you want to enable
model_no_interactions = HistGradientBoostingRegressor(
interaction_cst="no_interactions"
)
model_pairwise_interactions = HistGradientBoostingRegressor(
interaction_cst="pairwise"
)
instead of
model_no_interactions = HistGradientBoostingRegressor(
interaction_cst=[[i] for i in range(X_train.shape[1])]
)
model_pairwise_interactions = HistGradientBoostingRegressor(
interaction_cst=list(itertools.combinations(range(n_features), 2))
)
Describe your proposed solution
-
"no_interactions"
is straight forward. -
"pairwise"
expands to a list that is quadratic in number of features. It might be more memory efficient to use generators internally.
Describe alternatives you've considered, if relevant
No response
Additional context
This was proposed as follow-up in #21020 (comment).