-
Notifications
You must be signed in to change notification settings - Fork 14
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
Feature request: `predict.Rborist with nTree argument #39
Comments
This could easily be slipped into the upcoming version, but why not just retrain with n-m trees? Prediction could be parametrized with a logical vector, for example, with 'n-m' entries of 'true' and the remaining 'm' entries 'false'. It seems, though, that these entries would need to be chosen at random, then applied iteratively, in order to get a good sense of over-fitting. |
Thank you for the speedy response. Wouldn't retraining a new RF require additional time? (and space) The use-case I am thinking of is that as with a GBM one can select the number of iterations, one could do something similar with an RF. |
Assuming a "moderate" number of predictors, it takes (very roughly) about ten times as long to train as to predict. So, yes, resampling from the same forest will be faster than retraining each time. The results will not be identical to to those obtained through retraining, but they may be suitable for your purposes. Unless forest are retained following prediction, though, there should not be a memory penalty.
Yes, but a new feature like this should be sufficiently general to support a variety of use cases.
I may be missing your point, but initializing an index vector seems like a two- or three-line operation at worst. |
|
Trees are stored sequentially but their sizes are not uniform so, in particular, stride is not fixed. In any case, bagging already introduces a precedent for ignoring a given tree at a given row. The feature you propose generalizes this a bit, when prediction is not bagged, by ignoring a given tree at all rows. |
I have a feature request: Would it be possible to have
predict.Rborist
to accept annTree
argument similar to the standardRborist
? Given that a forest hasN
trees, we should be able to provide predictions usingN-M
trees.This functionality can be useful to see if/when additional tress lead to over-fitting.
The text was updated successfully, but these errors were encountered: