# Estimate the parameters of an ellipse in the presence of large outliers

I have a number of points $x_1,\ldots,x_m\in\mathbb{R}^n$ with weights $w_1,\ldots,w_m$ between 0 and 1. There is an ellipse which contains a very high concentration of points with weights close to one, but there are also many points scattered outside the ellipse with large weights, and not all the points in the ellipse have large weights. Still, from inspection, it's very obvious where the boundaries of this ellipse are. I'm trying to estimate $\mu\in\mathbb{R}^n$ and $C\succ0$ such that the ellipse is defined by all points $\left\{x\middle|(x-\mu)^T C (x-\mu) < 1\right\}$. I am trying to do this by solving:

$\min_{\mu,C\succeq 0} \sum_{i=1}^m w_i L((x_i-\mu)^T C (x_i-\mu))$

where $L(x) = 0$ if $|x|<1$, $L(x) = |x|-1$ if $x\ge 1$. It might also be worth adding a penalty on the log determinant of $C$, which is equivalent to penalizing the volume of the ellipse.

and I have two questions

1) Does this make sense as a robust way of finding a bounding ellipse? Is there a more natural objective given the problem I described? I know there are solvers out there for finding the minimum volume enclosing ellipse, but those don't include weights or outliers.

2) How would I actually go about implementing this optimization? I haven't seen much out there about combining semidefinite programming with hinge-type losses.