Learn R Programming

starnet (version 0.0.3)

weights.starnet: Extract Weights

Description

Extracts coefficients from the meta learner, i.e. the weights for the base learners.

Usage

# S3 method for starnet
weights(object, ...)

Arguments

object

starnet object

...

further arguments (not applicable)

Value

Vector containing intercept and slopes from the meta learner.

Examples

Run this code
# NOT RUN {
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)

# }

Run the code above in your browser using DataLab