Fitting Methods#
This notebook describes various methods available in the gwrefpy package for fitting observation and reference data.
Currently supported fitting methods include:
Linear Regression
Nth order polynomial fitting
Chebyshev polynomial fitting
Linear Regression#
The linear regression fitting method fits a straight line to the data using the least squares method. It is suitable for data that exhibits a linear relationship.
The equation for a linear regression is given by:
where \(a_0\) and \(a_1\) are the coefficients.
Nth Order Polynomial Fitting#
The Nth order polynomial fitting method fits a polynomial of degree N to the data. This method is useful when more degrees of freedom are needed to capture the relationship between the variables.
The equation for a Nth order polynomial is given by:
where \(a_0\), \(a_1\), \(...\), \(a_N\) are the coefficients of the polynomial.
Chebyshev Polynomial Fitting#
The Chebyshev polynomial fitting method uses Chebyshev polynomials to fit the data. Chebyshev polynomials are orthogonal polynomials that can provide a good approximation for functions over a specific interval.
The equation for a Chebyshev polynomial of degree N is given by:
where \(T_N(x)\) is the Chebyshev polynomial of degree \(N\) and \(a_0\), \(a_1\), \(...\), \(a_N\) are the coefficients of the polynomial. The Chebyshev polynomials are defined recursively as: