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

protect(): protection stack overflow #516

Closed
ghost opened this issue Jun 4, 2020 · 2 comments · Fixed by #703
Closed

protect(): protection stack overflow #516

ghost opened this issue Jun 4, 2020 · 2 comments · Fixed by #703

Comments

@ghost
Copy link

ghost commented Jun 4, 2020

Hello, when I used ranger to build a random forest, there was a problem:Error: protect(): protection stack overflow. My data is 2000 rows, 40000 columns. What can I do?

Thanks for the ranger package, anyway!

@mnwright
Copy link
Member

mnwright commented Jun 5, 2020

That's usually the formula interface. Try the x/y interface or dependent.variable.name, e.g.

ranger(y = iris[, 5], x = iris[, -5])
or
ranger(dependent.variable.name = "Species", data = iris)

I think the error itself is hard to catch, but we should think about a warning or error if the formula interface is used on data with many columns.

@mnwright
Copy link
Member

mnwright commented Nov 9, 2023

Warning added in #703.

@mnwright mnwright closed this as completed Nov 9, 2023
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

Successfully merging a pull request may close this issue.

1 participant