[R] How to find absolute residuals
kry|ov@r00t @end|ng |rom gm@||@com
Wed Dec 18 12:44:03 CET 2019
On Wed, 18 Dec 2019 10:06:56 +0100
javed khan <javedbtk111 using gmail.com> wrote:
> grid_search <- train(log10(Results) ~ ., data = tr,
> method = "svmRadial",
> ## Will create 48 parameter combinations
> ## tuneLength = 15,
> metric = "MAE",
> preProc = c("center", "scale", "zv"),
> trControl = ctrl2)
There is no "train" function in R core, so I'm going to invoke my
psychic debugging powers and determine that you are using the "caret"
> I need the absolute residuals (actual-predicted values) in a table or
> another sequential format so that I may perform statistical analysis
> on it later.
Caret seems to provide a residuals() method for objects of class "train"
returned from the train() function. If all else fails, you could always
call predict() and compute the residuals yourself.
More information about the R-help