Polyfit
fit a polynomial
Polyfit Documentation

Fits a polynomial to a set of points using linear regression. Provides a RANSAC option to fit a regressor that is robust to outliers. Includes a program to stochastically generate points from a polynomial with Gaussian error.

Licensed under Creative Commons BY-NC-SA 3.0.

Questions or comments? Contact Joseph Schlecht.

Use 'polyfit' to fit a polynomial to a set of points.

usage: polyfit OPTIONS
where OPTIONS is one or more of the following:
 -h, --help              Prints program usage.
 -v, --version           Prints program version.
     --seed=ARG          Random seed.
 -s, --sigma=ARG         Gaussian sigma.
 -d, --degree=ARG        Polynomial degree.
     --ransac=ARG        RANSAC robust regression options. Has format n,k,t,d to
                         represent: (n) Number of points to start with, (k)
                         Iterations, (t) Goodness-of-fit threshold for adding a
                         point, and (d) Min number of points needed for a good
                         fit.

Use 'polygen' to generate points from a polynomial with Gauss error.

usage: polygen OPTIONS
where OPTIONS is one or more of the following:
 -h, --help              Prints program usage.
 -v, --version           Prints program version.
     --seed=ARG          Random seed.
     --w-gauss=ARG       Gaussian over w to generate points from. Has format
                         mu,sigma.
     --w-uni=ARG         Uniform range over w to generate points from. Has
                         format min,max.
     --x-range=ARG       Range over x to generate points from.
     --sigma=ARG         Gaussian sigma for polynomial point generation.
     --outlier=ARG       Percentage of points to generate as outliers.
     --outlier-sigma=ARG  
                         Gaussian sigma for polynomial outlier point
                         generation.
 -d, --degree=ARG        Polynomial degree.
 -n, --num-pts=ARG       Number of points to generate.