coef.sparselink {sparselink} | R Documentation |
Regression Coefficients
Description
Extracts coefficients from multi-task or transfer learning regression model.
Usage
## S3 method for class 'sparselink'
coef(object, ...)
Arguments
object |
object of class |
... |
(not applicable) |
Value
Returns estimated coefficients.
The output is a list with two slots:
slot alpha
with the estimated intercept
(vector of length q
),
and slot beta
with the estimated slopes
(matrix with p
rows and q
columns).
References
Armin Rauschenberger, Petr N. Nazarov, and Enrico Glaab (2025). "Estimating sparse regression models in multi-task learning and transfer learning through adaptive penalisation". Under revision. https://hdl.handle.net/10993/63425
See Also
Use sparselink
to fit the model
and predict
to make predictions.
Examples
family <- "gaussian"
type <- "multiple" # try "multiple" or "transfer"
if(type=="multiple"){
data <- sim_data_multi(family=family)
} else if(type=="transfer"){
data <- sim_data_trans(family=family)
}
object <- sparselink(x=data$X_train,y=data$y_train,family=family)
coef <- coef(object=object)
[Package sparselink version 1.0.0 Index]