I've got some y(x) 2D data set. I would like to find a function fitting this data:

enter image description here

Is there any open source or free software to find a function to approximate a data sequence like the above?

Here is what I found so far:

  1. Fityk is a program for data processing and nonlinear curve fitting. The program can be used for any task that requires fitting a curve to 2D (x,y) data.
  2. Simfit is a free software OpenSource Windows/Linux package for simulation, curve fitting, statistics, and plotting, using a library of models or user-defined equations.
  3. Zunzun.com website. Here you can curve fit and surface fit your 2D and 3D data online with a rich set of error histograms, error plots, curve plots, surface plots, contour plots, VRML, auto-generated source code, and PDF file output.

If I understand your question correctly, you want to fit a function to your data, but you don't have any idea what family of functions to use.

Try Eureqa. It uses artifical intelligence to guess what formula might be generating your data. The approach is based on genetic algorithms which do a symbolic regression. It takes a bit of computational time, but it will be attempting to build a formula for your data. http://creativemachines.cornell.edu/eureqa

Another idea is doing a spline regression. Here, we get around the lack of knowledge about the overall functional form, by modelling the curve locally. The 'splines' library for R can be used for this.

Also, let me give an honorable mention to python. It has good curve fitting ability. It's free and available on Windows, Linux and OS X. You will have to install python, numpy and scipy. Here is an example of what's possible, http://docs.scipy.org/doc/scipy/reference/generated/scipy.optimize.curve_fit.html

You might also want to take a look at scikits-learn (another python package), http://scikit-learn.org/stable/


One nice option might be

  • Cornell University's Eureka,

    accessible via the link, and free to download, with access to documentation. This option doesn't presume much in the way of users' knowledge relating to statistical anaylysis.

If you have an on-going need for the modeling and analysis of data, you might want to check out

What is R?

R is a language and environment for statistical computing and graphics. It is a GNU project...[that] provides a wide variety of statistical (linear and nonlinear modelling, classical statistical tests, time-series analysis, classification, clustering, ...) and graphical techniques, and is highly extensible...One of R's strengths is the ease with which well-designed publication-quality plots can be produced, including mathematical symbols and formulae where needed.

At the link provided above, you can access and download free software designed especially for statistical computing and data anaylysis. It compiles and runs on a wide variety of UNIX platforms, Windows and MacOS.

The site linked above also includes access to a user-manual, Wiki, a journal, and FAQ's, (and I believe there is also support available via a user's forum). You might want to explore the documentation to check if this package might be of any value to you.


http://zunzun.com, my web site, has a "function finder" that fits hundreds of equations to a data set and ranks the graphical results. It won't cost anything to try it, and no download is needed since it runs online.


  • $\begingroup$ There is a pointer to your site in the question. $\endgroup$ – Amzoti Jan 5 '13 at 23:53
  • $\begingroup$ The site doesn't seem to be working anymore. $\endgroup$ – Jose Gómez May 10 '16 at 9:58

zunzun does not seem to be available any longer. However, I found http://www.mycurvefit.com to be a useful alternative for trying different models. This includes linear, non-linear regression, splines and custom models.

  • $\begingroup$ This looks interesting, but I don't see a way to export the function itself. $\endgroup$ – Jose Gómez May 10 '16 at 10:49
  • 2
    $\begingroup$ Click the grey text under the chart and select Export Equation. $\endgroup$ – Mister Cook May 15 '16 at 18:09

I would try SCaVis scientific data-analysis program. f you look at the manual, it has several methods to fit data using arbitrary complex function (analytic or not). It has also several methods to fit data interactively. The program is written in Java, but you can create scripts in Python (or Jython) as well.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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