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.
create.hypersphere.data(
dim,
n,
dist = function(x) runif(x, -1, 1),
norm = 2,
radius = 1
)
list(X = [Matrix], Y = [vector], orig.features = logical)
[integer(1)]
number of columns to create.
[integer(1)]
number of sample to create.
[function]
function n
-> numeric(n)
that is used to sample points dimension-wise.
[numeric(1)]
Norm exponent.
[numeric(1)]
Radius to check against.
Other Artificial Datasets:
clonetask()
,
create.linear.data()
,
create.linear.toy.data()
,
create.regr.task()
,
task.add.permuted.cols()
,
task.add.random.cols()