| svor_exc | R Documentation |
This function fits the Support Vector Ordinal Regression with Explicit Constraints based on the research of Chu and Keerthi (2007).
## Default S3 method:
svor_exc(
x,
y,
cost = 1,
method = c("smo"),
weights = NULL,
control = list(kernel = "linear", sigma = if (is.vector(x)) 1 else 1/ncol(x),
max_step = 500, scale = TRUE, verbose = FALSE),
...
)
## S3 method for class 'formula'
svor_exc(formula, data, ...)
## S3 method for class 'mi_df'
svor_exc(x, ...)
x |
A data.frame, matrix, or similar object of covariates, where each
row represents an instance. If a |
y |
A numeric, character, or factor vector of bag labels for each
instance. Must satisfy |
cost |
The cost parameter in SVM. |
method |
The algorithm to use in fitting (default |
weights |
|
control |
list of additional parameters passed to the method that control computation with the following components:
|
... |
Arguments passed to or from other methods. |
formula |
A formula with specification |
data |
If |
An object of class svor_exc The object contains at least the
following components:
smo_fit: A fit object from running the modified ordinal smo algorithm.
call_type: A character indicating which method svor_exc() was called
with.
features: The names of features used in training.
levels: The levels of y that are recorded for future prediction.
cost: The cost parameter from function inputs.
n_step: The total steps used in the heuristic algorithm.
x_scale: If scale = TRUE, the scaling parameters for new predictions.
default: Method for data.frame-like objects
formula: Method for passing formula
mi_df: Method for mi_df objects, automatically handling bag
names, labels, and all covariates. Use the bag_label as y at the
instance level, then perform svor_exc() ignoring the MIL structure and
bags.
Sean Kent
Chu, W., & Keerthi, S. S. (2007). Support vector ordinal regression. Neural computation, 19(3), 792-815. doi: 10.1162/neco.2007.19.3.792
predict.svor_exc() for prediction on new data.
data("ordmvnorm")
x <- ordmvnorm[, 3:7]
y <- attr(ordmvnorm, "instance_label")
mdl1 <- svor_exc(x, y)
predict(mdl1, x)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.