[R] Regarding randomForest regression
Stefan MA (MOH)
Stefan_MA at moh.gov.sg
Fri Mar 9 02:18:12 CET 2012
Sent from my HTC
From: David Winsemius <dwinsemius at comcast.net>
Sent: Friday, 9 March 2012 12:26 AM
To: shameek ghosh <shameek09 at gmail.com>
Cc: r-help at r-project.org <r-help at r-project.org>
Subject: Re: [R] Regarding randomForest regression
On Mar 8, 2012, at 5:10 AM, shameek ghosh wrote:
> This query is related to randomForest regression using R.
> I have a dataset called qsar.arff which I use as my training set
> then I run the following function -
> where train is a matrix of predictors without the column to be
> predicted(the target column), trainy is the target column.I feed the
> data for xtest and ytest too as shown.
> On verifying I found, rf$mse and rf$test$mse are
> different(the r-squares are also different).The predicted values of
> training target column and testing target column are also different.
> Should this happen , since I am using the training dataset as the
> testing dataset? I expected that the test and training predictions
> would be
> the same.
My inference from its name _random_Forest, was that it was _not_
David Winsemius, MD
West Hartford, CT
R-help at r-project.org mailing list
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.
More information about the R-help