Re: Prediction interval for random forest

Eibe Frank <[email protected]>
Newsgroups gmane.comp.ai.weka
Message-ID <CADehzLVQ_aZ2T315ZjpheUH=znMrLTQWHVSogB9f3btQouQyJA@mail.gmail.com>
Good question. No, you will almost certainly not be able to get exactly the
same root mean squared error or mean absolute error by using
RegressionByDiscretization. However, you should be able to get pretty close
by wrapping RandomForest into OrdinalClassClassifier (there is a WEKA
package of that name) and tuning the number of bins used in the
discretisation in RegressionByDiscretization. That has been my experience
anyway. Here is an example configuration with 50 bins:

weka.classifiers.meta.RegressionByDiscretization -B 50 -E -K
weka.estimators.UnivariateKernelEstimator -W
weka.classifiers.meta.OrdinalClassClassifier -- -W
weka.classifiers.trees.RandomForest

There is currently no way in WEKA to get prediction intervals from random
forests directly. Gaussian process regression in WEKA can give you
prediction intervals though. In fact, that means there would be another way
to get prediction intervals using RandomForest: by using it as a partition
generator that creates a feature space suitable for a linear Gaussian
process model. Here is the configuration:

weka.classifiers.meta.FilteredClassifier -F
"weka.filters.supervised.attribute.PartitionMembership -W
weka.classifiers.trees.RandomForest" -W
weka.classifiers.functions.GaussianProcesses

Unfortunately, FilteredClassifier doesn't currently pass through the
prediction intervals that GaussianProcesses can generate so some changes to
the code are required.

Note that you don't need Bagging. RandomForest is a simple wrapper of
Bagging with RandomTree as the base learner.

Cheers,
Eibe

PS: Google put your message into my spam folder, claiming that it could not
verify the sender.

On Sat, Aug 28, 2021 at 12:22 PM <[email protected]> wrote:

> Hello,
> I have trained random forest using Weka for a regression problem. I want
> to calculate the prediction interval without using Bagging and
> RegressionByDiscretization. Is there a way to get the prediction interval
> from the random forest? If not, is it possible to train random forest using
> Bagging and RegressionByDiscretization and get the same error rate as when
> training the random forest without Bagging and RegressionByDiscretization?
> _______________________________________________
> Wekalist mailing list -- [email protected]
> Send posts to [email protected]
> To unsubscribe send an email to [email protected]
> To subscribe, unsubscribe, etc., visit
> https://list.waikato.ac.nz/postorius/lists/wekalist.list.waikato.ac.nz
> List etiquette:
> http://www.cs.waikato.ac.nz/~ml/weka/mailinglist_etiquette.html
>

_______________________________________________
Wekalist mailing list -- [email protected]
Send posts to [email protected]
To unsubscribe send an email to [email protected]
To subscribe, unsubscribe, etc., visit https://list.waikato.ac.nz/postorius/lists/wekalist.list.waikato.ac.nz
List etiquette: http://www.cs.waikato.ac.nz/~ml/weka/mailinglist_etiquette.html
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.