Chooses the most appropriate polynomial fit, using the Aikaike Information Criterion
This function uses the Aikaike Information Criterion to find the most appropriate polynomial order to a set of X, Y data points.
- Parameters:
- x
Iterable The x-component of the data
- y
Iterable The y-component of the data
- err
Iterable The error bar on ‘y’
- poly_max
int, optional, default=10 The maximum polynomial order to test
- Returns:
- poly_ord
int The best polynomial order
- coeffs
list The polynomial coefficients.