preselected.sample: Selected randomized controlled random sample

Description Usage Arguments Details Value Author(s) Examples

Description

Creates a random sample keeping the proportions of 1 and 0 that are in label.

Usage

1

Arguments

label

vector of 0 and 1.

ns

sample size, contain ns random index of label.ns has to be lower than length of label.

Details

The aim of this method is to select randomly ns index of label. This function returns a vector of size ns composed of random rank of label.

Value

index.learn

a vector of size ns containing random index of label.

Author(s)

Caroline Bazzoli, Thomas Bouleau, Sophie Lambert-Lacroix

Examples

1
2
3
4
5
#load data
data(BreastCancer)
index<-preselected.sample(BreastCancer$Y,10)
index
BreastCancer$Y[index]      

lsplsGlm documentation built on May 2, 2019, 12:36 p.m.