RPModel {RPEnsemble}R Documentation

Generate pairs (x,y) from joint distribution

Description

Generates data from the models described in Cannings and Samworth (2017)

Usage

RPModel(Model.No, n, p, Pi = 1/2)

Arguments

Model.No

Model Number

n

Sample size

p

Data dimension

Pi

Class one prior probability

Value

x

An n by p data matrix – n observations of the p-dimensional features

y

A vector of length n containing the classes (either 1 or 2)

Note

Models 1 and 2 require p = 100 or 1000.

Author(s)

Timothy I. Cannings and Richard J. Samworth

References

Cannings, T. I. and Samworth, R. J. (2017) Random-projection ensemble classification, J. Roy. Statist. Soc., Ser. B. (with discussion), 79, 959–1035

Examples

Data <- RPModel(Model.No = 1, 100, 100, Pi = 1/2)
table(Data$y)
colMeans(Data$x[Data$y==1,])
colMeans(Data$x[Data$y==2,])

[Package RPEnsemble version 0.5 Index]