Description Usage Arguments Value References Examples
This function fits the ordered homogeneity pursuit lasso (OHPL) model.
1 2 |
x |
Predictor matrix. |
y |
Response matrix with one column. |
maxcomp |
Maximum number of components for PLS. |
gamma |
A number between (0, 1) for generating
the gamma sequence. An usual choice for gamma could be
|
cv.folds |
Number of cross-validation folds. |
G |
Maximum number of variable groups. |
type |
Find the maximum absolute correlation ( |
scale |
Should the predictor matrix be scaled?
Default is |
pls.method |
Method for fitting the PLS model.
Default is |
A list of fitted OHPL model object with performance metrics.
You-Wu Lin, Nan Xiao, Li-Li Wang, Chuan-Quan Li, and Qing-Song Xu (2017). Ordered homogeneity pursuit lasso for group variable selection with applications to spectroscopic data. Chemometrics and Intelligent Laboratory Systems 168, 62-71. https://doi.org/10.1016/j.chemolab.2017.07.004
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 | # generate simulation data
dat <- OHPL.sim(
n = 100, p = 100, rho = 0.8,
coef = rep(1, 10), snr = 3, p.train = 0.5,
seed = 1010
)
# split training and test set
x <- dat$x.tr
y <- dat$y.tr
x.test <- dat$x.te
y.test <- dat$y.te
# fit the OHPL model
fit <- OHPL(x, y, maxcomp = 3, gamma = 0.5, G = 10, type = "max")
# selected variables
fit$Vsel
# make predictions
y.pred <- predict(fit, x.test)
# compute evaluation metric RMSEP, Q2 and MAE for the test set
perf <- OHPL.RMSEP(fit, x.test, y.test)
perf$RMSEP
perf$Q2
perf$MAE
|
[1] 1 2 3 4 5 6 7 8 9 10
[1] 4.328435
[1] 0.4259523
[1] 3.404655
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.