create.linear.toy.data: Linear Toy Data

View source: R/datagen.R

create.linear.toy.dataR Documentation

Linear Toy Data

Description

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.

Usage

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

Other Artificial Datasets: clonetask(), create.hypersphere.data(), create.linear.data(), create.regr.task(), task.add.permuted.cols(), task.add.random.cols()


mosmafs documentation built on Nov. 3, 2022, 1:05 a.m.