Extracts coefficients from the meta learner, i.e. the weights for the base learners.
# S3 method for class 'starnet'
weights(object, ...)
starnet object
further arguments (not applicable)
Vector containing intercept and slopes from the meta learner.
# \donttest{
set.seed(1)
n <- 50; p <- 100
y <- rnorm(n=n)
X <- matrix(rnorm(n*p),nrow=n,ncol=p)
object <- starnet(y=y,X=X)
weights(object)# }
#> (Intercept) V1 V2 V3 V4 V5
#> 0.1004483 0.0000000 0.0000000 0.0000000 0.0000000 0.0000000
#> V6 V7 V8 V9 V10 V11
#> 0.0000000 0.0000000 0.0000000 0.0000000 0.0000000 0.0000000
#> V12 V13 V14 V15 V16 V17
#> 0.0000000 0.0000000 0.0000000 0.0000000 0.0000000 0.0000000
#> V18 V19 V20 V21
#> 0.0000000 0.0000000 0.0000000 0.0000000