https://github.com/nixtla logo
#general
Title
# general
r

Rachel Yee

05/15/2023, 6:43 AM
Hi all, got a quick question. Why does ml forecast cross validation take much longer when I fit a random forest regressor compared to xgboost regressor? Xgboost took about 30 seconds for my data but random forest took about 12 mins. Is there a way to speed it up?
f

fede (nixtla) (they/them)

05/17/2023, 8:55 PM
hey @Rachel Yee! XGBoost is generally faster due to the underlying gradient calculation. You could reduce the complexity of the hyperparameters of the random forest model, reducing
max_depth
, and
n_estimators
.