spiral

hyppo.tools.spiral(n, p, noise=False, low=0, high=5)

Spiral simulation.

Spiral (X,Y)Rp×R: UU(0,5), ϵN(0,1)

X|d|=Usin(πU)cosd(πU) for d=1,...,p1X|p|=Ucosp(πU)Y=Usin(πU)+0.4pϵ
Parameters
  • n (int) -- The number of samples desired by the simulation (>= 5).

  • p (int) -- The number of dimensions desired by the simulation (>= 1).

  • noise (bool, default: False) -- Whether or not to include noise in the simulation.

  • low (float, default: 0) -- The lower limit of the uniform distribution simulated from.

  • high (float, default: 5) -- The upper limit of the uniform distribution simulated from.

Returns

x,y (ndarray of float) -- Simulated data matrices. x` and ``y have shapes (n, p) and (n, 1) where n is the number of samples and p is the number of dimensions.

Examples using hyppo.tools.spiral