Paparazzi UAS  v5.8.2_stable-0-g6260b7c
Paparazzi is a free software Unmanned Aircraft System.
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Modules Pages
pprz_polyfit_float.h File Reference

Polynomial regression. More...

+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Functions

void pprz_polyfit_float (float *x, float *y, int n, int p, float *c)
 Polynomial regression. More...
 

Detailed Description

Polynomial regression.

Definition in file pprz_polyfit_float.h.

Function Documentation

void pprz_polyfit_float ( float *  x,
float *  y,
int  n,
int  p,
float *  c 
)

Polynomial regression.

Polynomial regression is a form of linear regression in which the relationship between the independent variable x and the dependent variable y is modelled as an nth order polynomial.

Considering the regression model:

\[ y_i = a_0 + a_1 x_i + ... + a_p x_i^p + \epsilon_i (i = 1 ... n) \]

in matrix form

\[ y = Xa + \epsilon \]

where

\[ X_{ij} = x_i^j (i = 1 ... n; j = 1 ... p) \]

The vector of estimated polynomial regression coefficients using ordinary least squares estimation is

\[ a = (X' X)^{-1} X' y \]

http://en.wikipedia.org/wiki/Polynomial_regression http://fr.wikipedia.org/wiki/R%C3%A9gression_polynomiale http://www.arachnoid.com/sage/polynomial.html

Parameters
[in]xpointer to the input array of independent variable X [n]
[in]ypointer to the input array of dependent variable Y [n]
[in]nnumber of input measurments
[in]pdegree of the output polynomial
[out]cpointer to the output array of polynomial coefficients [p]

Polynomial regression is a form of linear regression in which the relationship between the independent variable x and the dependent variable y is modelled as an nth order polynomial.

Considering the regression model:

\[ y_i = c_0 + c_1 x_i + ... + c_p x_i^p + \epsilon_i (i = 1 ... n) \]

in matrix form

\[ y = X.c + \epsilon \]

where

\[ X_{ij} = x_i^j (i = 1 ... n; j = 1 ... p) \]

The vector of estimated polynomial regression coefficients using ordinary least squares estimation is

\[ c = (X' X)^{-1} X' y \]

http://en.wikipedia.org/wiki/Polynomial_regression http://fr.wikipedia.org/wiki/R%C3%A9gression_polynomiale http://www.arachnoid.com/sage/polynomial.html

Parameters
[in]xpointer to the input array of independent variable X [n]
[in]ypointer to the input array of dependent variable Y [n]
[in]nnumber of input measurments
[in]pdegree of the output polynomial
[out]cpointer to the output array of polynomial coefficients [p+1]

Definition at line 63 of file pprz_polyfit_float.c.

References float_mat_zero(), float_vect_zero(), MAKE_MATRIX_PTR, pprz_svd_float(), and pprz_svd_solve_float().

+ Here is the call graph for this function: