Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

random forest takes too long #83

Open
EmilHvitfeldt opened this issue Feb 13, 2025 · 0 comments
Open

random forest takes too long #83

EmilHvitfeldt opened this issue Feb 13, 2025 · 0 comments
Labels
feature a feature request or enhancement

Comments

@EmilHvitfeldt
Copy link
Member

parsing, most likely in {tidypredict} take a LONG time for random forest models. A single tree takes me over 45 seconds and allocates a lot of memory, i'm confident we can make some improvements.

library(tidymodels)
library(orbital)

rec_spec <- recipe(Sale_Price ~ ., data = ames) |>
  step_normalize(all_numeric_predictors()) |>
  step_dummy(all_nominal_predictors())

mod_spec <- rand_forest("regression", trees = 1)

wf_spec <- workflow(rec_spec, mod_spec)

wf_fit <- fit(wf_spec, ames)

wf_fit

tictoc::tic()
orb <- orbital(wf_fit)
tictoc::toc()
48.52 sec elapsed
@EmilHvitfeldt EmilHvitfeldt added the feature a feature request or enhancement label Feb 13, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature a feature request or enhancement
Projects
None yet
Development

No branches or pull requests

1 participant