s2net-package {s2net} | R Documentation |
The Generalized Semi-Supervised Elastic-Net
Description
Implements the generalized semi-supervised elastic-net. This method extends the supervised elastic-net problem, and thus it is a practical solution to the problem of feature selection in semi-supervised contexts. Its mathematical formulation is presented from a general perspective, covering a wide range of models. We focus on linear and logistic responses, but the implementation could be easily extended to other losses in generalized linear models. We develop a flexible and fast implementation, written in 'C++' using 'RcppArmadillo' and integrated into R via 'Rcpp' modules. See Culp, M. 2013 <doi:10.1080/10618600.2012.657139> for references on the Joint Trained Elastic-Net.
Details
The DESCRIPTION file:
Package: | s2net |
Type: | Package |
Title: | The Generalized Semi-Supervised Elastic-Net |
Version: | 1.0.7 |
Date: | 2024-03-04 |
Authors@R: | c(person("Juan C.", "Laria",, role = c("aut", "cre"), email = "juank.laria@gmail.com", comment = c(ORCID = "0000-0001-7734-9647")), person("Line H.", "Clemmensen",, role = c("aut"), email = "lkhc@dtu.dk")) |
Description: | Implements the generalized semi-supervised elastic-net. This method extends the supervised elastic-net problem, and thus it is a practical solution to the problem of feature selection in semi-supervised contexts. Its mathematical formulation is presented from a general perspective, covering a wide range of models. We focus on linear and logistic responses, but the implementation could be easily extended to other losses in generalized linear models. We develop a flexible and fast implementation, written in 'C++' using 'RcppArmadillo' and integrated into R via 'Rcpp' modules. See Culp, M. 2013 <doi:10.1080/10618600.2012.657139> for references on the Joint Trained Elastic-Net. |
License: | GPL (>= 2) |
Imports: | Rcpp, methods, MASS |
Depends: | stats |
LinkingTo: | Rcpp, RcppArmadillo |
Suggests: | knitr, rmarkdown, glmnet, Metrics, testthat |
VignetteBuilder: | knitr |
URL: | https://github.com/jlaria/s2net |
BugReports: | https://github.com/jlaria/s2net/issues |
Encoding: | UTF-8 |
RoxygenNote: | 7.2.0 |
Author: | Juan C. Laria [aut, cre] (<https://orcid.org/0000-0001-7734-9647>), Line H. Clemmensen [aut] |
Maintainer: | Juan C. Laria <juank.laria@gmail.com> |
Index of help topics:
Rcpp_s2net-class Class 's2net' auto_mpg Auto MPG Data Set predict.s2netR S3 Methods for 's2netR' objects. predict_Rcpp_s2net Predict method for 's2net' C++ class. print.s2Data Print methods for S3 objects s2Data Data wrapper for 's2net'. s2Fista Hyper-parameter wrapper for FISTA. s2Params Hyper-parameter wrapper for 's2net' s2net The Generalized Semi-Supervised Elastic-Net s2netR Trains a generalized extended linear joint trained model using semi-supervised data. simulate_extra Simulate extrapolated data simulate_groups Simulate data (two groups design)
This package includes a very easy-to-use interface for handling data, with the s2Data
function. The main function of the package is the s2netR
function, which is a wrapper for the Rcpp_s2net
(s2net
) class.
Author(s)
Juan C. Laria [aut, cre] (<https://orcid.org/0000-0001-7734-9647>), Line H. Clemmensen [aut]
References
Laria, J.C., L. Clemmensen (2019). A generalized elastic-net for semi-supervised learning of sparse features.
Sogaard Larsen, J. et. al. (2019). Semi-supervised covariate shift modelling of spectroscopic data.
Ryan, K. J., & Culp, M. V. (2015). On semi-supervised linear regression in covariate shift problems. The Journal of Machine Learning Research, 16(1), 3183-3217.
See Also
Examples
data("auto_mpg")
train = s2Data(xL = auto_mpg$P1$xL, yL = auto_mpg$P1$yL, xU = auto_mpg$P1$xU)
model = s2netR(train,
s2Params(lambda1 = 0.1,
lambda2 = 0,
gamma1 = 0.1,
gamma2 = 100,
gamma3 = 0.1))
# here we tell it to transform the valid data as we did with train.
valid = s2Data(auto_mpg$P1$xU, auto_mpg$P1$yU, preprocess = train)
ypred = predict(model, valid$xL)
## Not run:
if(require(ggplot2)){
ggplot() +
aes(x = ypred, y = valid$yL) + geom_point() +
geom_abline(intercept = 0, slope = 1, linetype = 2)
}
## End(Not run)