Learn R Programming

RaSEn (version 3.0.0)

RaModel: Generate data \((x, y)\) from various models in two papers.

Description

RaModel generates data from 4 models described in Tian, Y. and Feng, Y., 2021(b) and 8 models described in Tian, Y. and Feng, Y., 2021(a).

Usage

RaModel(model.type, model.no, n, p, p0 = 1/2, sparse = TRUE)

Arguments

model.type

indicator of the paper covering the model, which can be 'classification' (Tian, Y. and Feng, Y., 2021(b)) or 'screening' (Tian, Y. and Feng, Y., 2021(a)).

model.no

model number. It can be 1-4 when model.type = 'classification' and 1-8 when model.type = 'screening', respectively.

n

sample size

p

data dimension

p0

marginal probability of class 0. Default = 0.5. Only used when model.type = 'classification' and model.no = 1, 2, 3.

sparse

a logistic object indicating model sparsity. Default = TRUE. Only used when model.type = 'classification' and model.no = 1, 4.

Value

x

n * p matrix. n observations and p features.

y

n responses.

References

Tian, Y. and Feng, Y., 2021(a). RaSE: A variable screening framework via random subspace ensembles. Journal of the American Statistical Association, (just-accepted), pp.1-30.

Tian, Y. and Feng, Y., 2021(b). RaSE: Random subspace ensemble classification. Journal of Machine Learning Research, 22(45), pp.1-93.

See Also

Rase, RaScreen.

Examples

Run this code
# NOT RUN {
train.data <- RaModel("classification", 1, n = 100, p = 50)
xtrain <- train.data$x
ytrain <- train.data$y

# }
# NOT RUN {
train.data <- RaModel("screening", 2, n = 100, p = 50)
xtrain <- train.data$x
ytrain <- train.data$y
# }

Run the code above in your browser using DataLab