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

parallel execution of importance_pvalues #718

Open
Christaline-George opened this issue Apr 10, 2024 · 1 comment
Open

parallel execution of importance_pvalues #718

Christaline-George opened this issue Apr 10, 2024 · 1 comment

Comments

@Christaline-George
Copy link

I have a dataset with 156065 rows.

I have used ranger to generate a random forest model.

Is it possible to run importance_pvalues function parallely on this random forest model and dataset as I need to run it with 1000 permutations(num.permutations)?

@mnwright
Copy link
Member

It's not implemented in the package because we didn't want to have a second parallelization in addition to the C++ parallelization. For large datasets, there probably is no benefit of running the permutations in parallel because the individual ranger fits run in parallel.
If you want to implement it anyway, it's not hard. Here is the loop that needs to be parallelized:

vimp <- sapply(1:num.permutations, function(i) {

Just use your favorite parallelization package instead of sapply there (either in the package or just do it manually outside of the package).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants