I'm using BoundingRegion to classify a list of data points using ellipsoid shapes. BoundingRegion tends to make sure that all points fit in the shape, including outlier points. Is there a way to control the accuracy of the bounding region and to weight it towards the centre?

I initially minimised the Euclidean distance to find a circle's centroid but shifted to BoundingRegion as I didn't want to play around with minimising ellipsoid rotations in addition to determining the ellipsoid x/y radii individually.

  • 3
    $\begingroup$ BoundingRegion is supposed to capture all the points. Instead you should consider fitting a MultinormalDistribution around your data and creating a 95% 'confidence ellipsoid' around it. $\endgroup$
    – flinty
    May 26, 2021 at 16:52
  • 1
    $\begingroup$ Another approach might be to use FindAnomalies or DeleteAnomalies, and then using BoundingRegion on the resulting points. $\endgroup$
    – Carl Lange
    May 26, 2021 at 16:57
  • $\begingroup$ Thanks both. Both options work well for what is needed, although it seems that DeleteAnomalies is a bit more CPU intensive. $\endgroup$
    – Letshin
    May 26, 2021 at 17:15

1 Answer 1


Following @flinty's advice and reading up on the MultivariateStatistics tutorial:

<< MultivariateStatistics`
temp = pts[[1]]; 
q = EllipsoidQuantile[temp, 0.95]; (*0.95 confidence*)

Gives a nice representation of an ellipsoid fit to the data.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.