View source: R/svmmajcrossval.R
svmmajcrossval | R Documentation |
This function performs a gridsearch of k-fold cross-validations using SVM-Maj and returns the combination of input values which has the best forecasting performance.
svmmajcrossval(
X,
y,
search.grid = list(lambda = 2^seq(5, -5, length.out = 19)),
...,
convergence = 1e-04,
weights.obs = 1,
check.positive = TRUE,
mc.cores = getOption("mc.cores"),
options = NULL,
verbose = FALSE,
ngroup = 5,
groups = NULL,
return.model = FALSE
)
X |
A data frame (or object coercible by
|
y |
A factor (or object coercible by |
search.grid |
A list with for each factor the range of values to search for. |
... |
Other arguments to be passed through |
convergence |
Specifies the convergence criterion for |
weights.obs |
Weights for the classes. |
check.positive |
Specifies whether a check should be performed for
positive |
mc.cores |
the number of cores to be used (for parallel computing) |
options |
additional settings used in the |
verbose |
|
ngroup |
The number of groups to be divided into. |
groups |
A predetermined group division for performing the cross validation. |
return.model |
|
loss.opt |
The minimum (weighted) missclassification rate found in out-of-sample training along the search grid. |
param.opt |
The level of the factors which gives the minimum loss term value. |
loss.grp |
A list of missclassification rates per hold-out sample |
groups |
A vector defining the cross-validation groups which has been used. |
qhat |
The estimated out-of-sample predicted values in the cross-validation. |
qhat.in |
The trained predicted values |
param.grid |
The matrix of all gridpoints which has been performed during the cross-validation, with its corresponding weighted out-of-sample missclassification rate. |
model |
The |
Hok San Yip, Patrick J.F. Groenen, Georgi Nalbantov
P.J.F. Groenen, G. Nalbantov and J.C. Bioch (2008) SVM-Maj: a majorization approach to linear support vector machines with different hinge errors.
svmmaj
Xt <- diabetes$X
yt <- diabetes$y
## performing gridsearch with k-fold cross-validation
results <- svmmajcrossval(
Xt, yt,
scale = 'interval',
mc.cores = 2,
ngroup = 5,
return.model = TRUE
)
summary(results$model)
results
plot(results)
plot(results, 'profile')
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.