The input is a zonotope with a best-fit ellipsoid
(or ellipse for a zonogon)
with axes that may have very different lengths.
The function computes a spherizing matrix W
, and then
transforms the zonotope so its boundary is close to a sphere.
# S3 method for zonotope
spherize( x, method='ZCA', ... )
After computing the matrix W
,
the function return lintransform(x,W)
.
The "sphering"
attribute is set to W
.
If x
is a 1D zonoseg, sphering is not really possible,
so the function prints a warning message and returns x
.
In case of error, the function returns NULL
.
a zonotope object - a zonohedron, a zonogon, or a zonoseg.
for computing the matrix W
, either 'ZCA'
or 'PCA-COR'
.
Matching is partial and case-insensitive.
not used
The 2 methods are taken from Kessy, et. al..
Agnan Kessy, Alex Lewin, Korbinian Strimmer.
Optimal whitening and decorrelation.
https://arxiv.org/abs/1512.00809
v4 2016.
lintransform()