coef.cv.dcsvm {dcsvm} | R Documentation |
Compute Coefficients from a "cv.dcsvm" Object
Description
Computes the coefficients at specified lambda
values for a cv.dcsvm
object.
Usage
## S3 method for class 'cv.dcsvm'
coef(object, s = c("lambda.1se", "lambda.min"), ...)
Arguments
object |
A fitted |
s |
Value(s) of the L1 tuning parameter |
... |
Other arguments that can be passed to |
Details
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.
Value
The returned object depends on the choice of s
and any additional arguments passed to the dcsvm
method.
See Also
cv.dcsvm
and predict.cv.dcsvm
methods.
Examples
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")