cECM | R Documentation |
Fits a regularized discriminant analysis model to labeled training data and generates an aggregate p-value for categorizing newly obtained data.
cECM(x, newdata = NULL, rda_params = NULL, transform = TRUE)
x |
Either a |
newdata |
a |
rda_params |
a |
transform |
Logical indicating if the supplied p-values should be transformed by the function |
Details on regularized discriminant analysis (RDA) can be found in \insertCitefriedman1989regularized;textualezECM. Details on related implementation found in \insertCiteanderson2007mathematical;textualezECM.
A list. Any returned objects contain a list element indicating the value of transform
supplied to the cECM
function call, as well as a klaR::rda()
object related to relevant training data. In addition if newdata
argument is supplied, the returned list contains a data.frame
specifying aggregate p-values for each new event (rows) for related event category (columns).
x <- pval_gen(sims = 20, pwave.arrival = list(optim.starts = 5))
s <- sample(1:20, size = 2)
newdata <- x[s,]
newdata <- newdata[,-which(names(newdata) == "event")]
x <- x[-s,]
pval_cat <- cECM(x = x, transform = TRUE)
pval_cat <- cECM(x = pval_cat, newdata = newdata)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.