Based on Weston (2000) Feature Selection for SVMs.

Creates matrix X and vector Y with six dimensions out of 202 relevant and equal probability of y = 1 or -1.

With a prob of 0.7 we draw xi = y * norm(i, 1) for i = 1, 2, 3 and xi = norm(0, 1) for i = 4, 5, 6. Otherwise: xi = norm(0, 1) for i = 1, 2, 3 and xi = y * norm(i - 3, 1) for i = 4, 5, 6.

All other features are noise.

create.linear.toy.data(n)

Arguments

n

[integer(1)] number of samples to draw.

Value

list(X = [Matrix], Y = [vector], orig.features = logical)

See also