mosmafs (version 0.1.2)

create.hypersphere.data: Create Hypersphere Data

Description

Creates hypersphere data with X as a n * dim matrix of sampled columns from dist. dist must be a function n -> vector length (n) and should (probably) sample randomly to create X.

Y is a vector with entries Y[i] = +1 if the L_norm of X[i, ] is < radius^norm, and Y[i] = -1 otherwise.

Usage

create.hypersphere.data(
  dim,
  n,
  dist = function(x) runif(x, -1, 1),
  norm = 2,
  radius = 1
)

Value

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

Arguments

dim

[integer(1)] number of columns to create.

n

[integer(1)] number of sample to create.

dist

[function] function n -> numeric(n) that is used to sample points dimension-wise.

norm

[numeric(1)] Norm exponent.

radius

[numeric(1)] Radius to check against.

See Also

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