simulate_extra | R Documentation |
Simulated data scenarios described in the paper from Ryan and Culp (2015).
simulate_extra(n_source = 100, n_target = 100, p = 1000, shift = 10,
scenario = "same", response = "linear", sigma2 = 2.5)
n_source |
Number of source samples (labeled) |
n_target |
Number of target samples (unlabeled) |
p |
Number of variables ( |
shift |
The shift applied to the first 10 columns of xU. |
scenario |
Simulation scenario. One of |
response |
Type of response: |
sigma2 |
The variance of the error term, linear response case. |
A list, with
data frame with the labeled (source) data
labels associated with xL
data frame with the unlabeled (target) data
labels associated with xU
(for validation/testing)
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.
simulate_groups
set.seed(0)
data = simulate_extra()
train = s2Data(data$xL, data$yL, data$xU)
valid = s2Data(data$xU, data$yU, preprocess = train)
model = s2netR(train, s2Params(0.1))
ypred = predict(model, valid$xL)
plot(ypred, valid$yL)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.