Reputation: 509
Relatively new to model building with sklearn. I know cross validation can be parallelized via the n_jobs parameter, but if I'm not using CV, how can I utilize my available cores to speed up model fitting?
Upvotes: 9
Views: 6775
Reputation: 89
There are alternatives like XGboost or LigtGMB that are distributed (i.e., can run parallel). These are well documented and popular boosting algorithms.
Upvotes: 2
Reputation: 557
At the moment afaik there is no parameter like "n_jobs" for the GradientBoosting method, but you can try to use the HistGradientBoostingRegressor which uses OpenMP for parallelization (will use as many threads as possible).
You can read more here: https://scikit-learn.org/stable/modules/ensemble.html https://scikit-learn.org/stable/modules/computing.html#parallelism
Upvotes: 1