s2net-package | R Documentation |
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.
The DESCRIPTION file: This package was not yet installed at build time.
Index: This package was not yet installed at build time.
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.
Juan C. Laria [aut, cre] (<https://orcid.org/0000-0001-7734-9647>), Line H. Clemmensen [aut]
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.
s2Data
,
s2netR
,
Rcpp_s2net
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)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.