Description Usage Arguments Examples
Scaling and centering of train set for standardization.
1 |
d |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 | ##---- Should be DIRECTLY executable !! ----
##-- ==> Define data, use random,
##-- or do help(data=index) for the standard data sets.
## The function is currently defined as
function (d)
{
d1 <- d[, -c(1, dim(d)[2])]
Mean <- apply(d1, 2, FUN = mean)
SD <- apply(d1, 2, FUN = sd)
d2 <- apply(d1, 2, FUN = function(x) {
return((x - mean(x))/sd(x))
})
Data <- as.data.frame(cbind(d[, 1], d2, d[, dim(d)[2]]))
colnames(Data) <- colnames(d)
Dd <- list(Mean = Mean, SD = SD, Data = Data)
return(Dd)
}
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.