Closed lawremi closed 5 years ago
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.
Improved functionality in dev version.
The
partial()
function fails on ranger objects unless thedata=
argument is explicitly named in the call.get_training_data.default()
could usematch.call()
to figure out the names when they are not specified. Also, it callseval()
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 agetCall()
method for an S4 class just as easily as for an S3 class.