multiDA.Rdthe multiDA function
Summarizes the trained multiDA classifier in a nice manner. User can select number of features to summarise
multiDA(X, y, penalty = c("EBIC", "BIC"), equal.var = TRUE, set.options = c("exhaustive", "onevsrest", "onevsall", "ordinal", "user"), sUser = NULL) # S3 method for multiDA plot(x, ranked = TRUE, ranks = 1:10, features = NULL) # S3 method for multiDA predict(object, newdata, ...) # S3 method for multiDA print(x, max.rank = 10, ...)
| X | matrix containing the training data. The rows are the sample observations, and the columns are the features. |
|---|---|
| y | vector of class values (for training) |
| penalty | default is in the form of the EBIC, which penalises based on the number of features. If option |
| equal.var | a |
| set.options | options for set partition matrix S. |
| sUser | if |
| x | trained multiDA object |
| ranks | a vector of which ranked features should be plot |
| object | trained multiDA object |
| newdata | matrix of observations to predict. Each row corresponds to a new observation. |
| ... | Any other variables which will be ignored |
| max.rank | number of significant features to display. If |
| x | object to print |
| ... | Any other variables which will be ignored. |
multiDA object that contains the trained multiDA classifier
plots
list predicted class memberships of each row in newdata
#train the multiDA classifier using the SRBCT dataset, and find the resubstitution error rate y <- SRBCT$y X <- SRBCT$X res <- multiDA(X, y, equal.var=TRUE, set.options="exhaustive", penalty="EBIC") vals <- predict(res, newdata=X)$y.pred #y.pred returns class labels rser <- sum(vals!=y)/length(y)