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.classifiers.meta.OrdinalClassClassifier -- -W
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:
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.
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 <emad.alharbi(a)york.ac.uk> wrote:
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 -- wekalist(a)list.waikato.ac.nz
Send posts to wekalist(a)list.waikato.ac.nz
To unsubscribe send an email to wekalist-leave(a)list.waikato.ac.nz
To subscribe, unsubscribe, etc., visit