Different files for train and test data

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view

Different files for train and test data


I have two files of my data: part1 and part2. I used part1 to train and
test my data and got the RMSE value. Now I need to compare my obtained
result (RMSE value) with unseen data i.e. part2 of data. How can I use the
same training data of part1 and part2 data as test data.

I am using caret package.

index <- createDataPartition(d$price, p = .70,list = FALSE)
tr <- d[index, ]
ts <- d[-index, ]
model <-train(price ~ ., data = tr,
method = "nnet",
metric = "RMSE",
trControl = ctr)

        [[alternative HTML version deleted]]

[hidden email] mailing list -- To UNSUBSCRIBE and more, see
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.