ellipse¶
-
hyppo.tools.
ellipse
(n, p, noise=False, low=- 1, high=1)¶ Ellipse simulation.
Ellipse (X,Y)∈Rp×Rp: U∼U(−1,1)p, ϵ∼N(0,Ip), r=5,
X|d|=r(sin(πU|d+1|)d∏j=1cos(πU|j|)+0.4ϵ|d|) for d=1,...,p−1X|p|=r(p∏j=1cos(πU|j|)+0.4ϵ|p|)Y|d|=sin(πU|1|)- 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:-1
) -- The lower limit of the uniform distribution simulated from.high (
float
, default:1
) -- The upper limit of the uniform distribution simulated from.
- Returns
x,y (
ndarray
) -- Simulated data matrices.x` and ``y
have shapes(n, p)
and(n, p)
where n is the number of samples and p is the number of dimensions.