Make a prediction with objects of class TDMenvir
, TDMclassifier
,
TDMregressor
. The prediction is based on the (last) model trained during
unbiasedRun
.
# S3 method for TDMenvir
predict(object, ...)# S3 method for TDMclassifier
predict(object, ...)
# S3 method for TDMregressor
predict(object, ...)
an object of class TDMenvir
, TDMclassifier
,
TDMregressor
containing in element lastModel
the relevant model.
arguments passed on to the model's predict function. Usually the first argument of ...
should be
newdata
, a data frame for which new predictions are desired.
a vector with length nrow(newdata)
containing the new predictions.
# NOT RUN {
# }
# NOT RUN {
## This example requires that demo04cpu.r is executed first (it will write demo04cpu.RData)
path <- paste(find.package("TDMR"), "demo01cpu/",sep="/");
tdm <- list( filenameEnvT="demo04cpu.RData" ); # file with environment envT
load(paste(path,tdm$filenameEnvT,sep="/"));
# take only the first 15 records:
newdata=read.csv2(file=paste(path,"data/cpu.csv", sep=""), dec=".")[1:15,];
z=predict(envT,newdata);
print(z);
# }
Run the code above in your browser using DataLab