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

get_training_data.default problems #90

Closed
lawremi opened this issue May 1, 2019 · 2 comments
Closed

get_training_data.default problems #90

lawremi opened this issue May 1, 2019 · 2 comments

Comments

@lawremi
Copy link

lawremi commented May 1, 2019

The partial() function fails on ranger objects unless the data= argument is explicitly named in the call. get_training_data.default() could use match.call() to figure out the names when they are not specified. Also, it calls eval() without an environment argument. The calling environment should be passed down the stack so that the evaluation happens in the right frame, although even that is not fool-proof. Why is there a check for S4 objects? There could be a getCall() method for an S4 class just as easily as for an S3 class.

@bgreenwell
Copy link
Owner

Good catch! This is not specific to ranger either. Honestly this function was only meant to be helpful in very general cases as it's always better to specify the training data via the train argument in the call to pdp::partial(). I'll try to push a fix relatively soon.

@bgreenwell
Copy link
Owner

Improved functionality in dev version.

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