# DD_tools: ball_dd

BALL_DD L_p ball description

W = BALL_DD(X,FRACREJ,P)

Fit a L_p ball around the data X by optimizing the weights:
min w_0
s.t. \sum_j w_j|x_ij-a_j|^p <= w_0
\sum_j w_j = 1,   w_j>=0
The vector a is taken as the mean of dataset X.

When the (feature-) weigths w are optimized, the threshold w_0
is set such that FRACREJ of the objects are outside the L_p ball.

As a precaution, features with no variance will be removed/ignored,
otherwise a trivial solution of only using that feature is found. You
will get a warning though.