coef.cv.dcsvm | R Documentation |
Computes the coefficients at specified lambda
values for a cv.dcsvm
object.
## S3 method for class 'cv.dcsvm'
coef(object, s = c("lambda.1se", "lambda.min"), ...)
object |
A fitted |
s |
Value(s) of the L1 tuning parameter |
... |
Other arguments that can be passed to |
Compute Coefficients from a "cv.dcsvm" Object
Computes coefficients at chosen values of lambda
from the cv.dcsvm
object.
This function computes the coefficients for lambda
values suggested by cross-validation.
The returned object depends on the choice of s
and any additional arguments passed to the dcsvm
method.
cv.dcsvm
and predict.cv.dcsvm
methods.
data(colon)
colon$x <- colon$x[ ,1:100] # Use only the first 100 columns for this example
set.seed(1)
cv <- cv.dcsvm(colon$x, colon$y, lam2=1, nfolds=5)
c1 <- coef(cv, s="lambda.1se")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.