Addition of RANSAC algorithm

Hi all,

For an internal project, we implemented a RANSAC algorithm for model-based fitting. We validated it with two cases:

  1. Line fitting using the dataset provided in the Wikipedia website
  2. Quadratic equation fitting

We obtain very good results for both cases (see images below).
In addition, we compared the fitting performed with RANSAC with the one performed by the least squares fitter used in PolynomialCurveFitter. The comparison, also presented in the images below, shows the capabilities of the RANSAC to perform a very good fitting.

Are you interested if we contribute this algorithm in the hipparchus-fitting package?

Best regards,
Bryan

Line fitting

Quadratic equation fitting

3 Likes

Hi @bcazabonne,

It looks very powerful! Of course this would a great addition to Hipparchus!!

Sure, it would be fine. Robust methods (in the statistical sense) are always a good thing.

Hello @bcazabonne,

Looks very interesting ! Thank you for suggesting this.

Cheers,
Vincent

Thanks for the feedbacks. It has been merged into develop!

4 Likes