Data Structures | |
struct | a_regress_simple |
instance structure for simple linear regression More... | |
Typedefs | |
typedef struct a_regress_simple | a_regress_simple |
Functions | |
void | a_regress_simple_init (a_regress_simple *ctx, a_float coef, a_float bias) |
initialize for simple linear regression | |
a_float | a_regress_simple_eval (a_regress_simple const *ctx, a_float val) |
calculate predicted value for simple linear regression | |
a_float | a_regress_simple_evar (a_regress_simple const *ctx, a_float val) |
calculate predicted value for simple linear regression | |
void | a_regress_simple_ols_ (a_regress_simple *ctx, a_size n, a_float const *x, a_float const *y, a_float x_mean, a_float y_mean) |
ordinary least squares for simple linear regression | |
void | a_regress_simple_olsx (a_regress_simple *ctx, a_size n, a_float const *x, a_float const *y, a_float x_mean) |
ordinary least squares for simple linear regression | |
void | a_regress_simple_olsy (a_regress_simple *ctx, a_size n, a_float const *x, a_float const *y, a_float y_mean) |
ordinary least squares for simple linear regression | |
void | a_regress_simple_ols (a_regress_simple *ctx, a_size n, a_float const *x, a_float const *y) |
ordinary least squares for simple linear regression | |
void | a_regress_simple_zero (a_regress_simple *ctx) |
zeroing for simple linear regression | |
a_float a_regress_simple_eval | ( | a_regress_simple const * | ctx, |
a_float | val ) |
calculate predicted value for simple linear regression
[in] | ctx | points to an instance of simple linear regression |
[in] | val | independent variable |
a_float a_regress_simple_evar | ( | a_regress_simple const * | ctx, |
a_float | val ) |
calculate predicted value for simple linear regression
[in] | ctx | points to an instance of simple linear regression |
[in] | val | dependent variable |
void a_regress_simple_init | ( | a_regress_simple * | ctx, |
a_float | coef, | ||
a_float | bias ) |
initialize for simple linear regression
[in,out] | ctx | points to an instance of simple linear regression |
[in] | coef | regression coefficient |
[in] | bias | intercept |
void a_regress_simple_ols | ( | a_regress_simple * | ctx, |
a_size | n, | ||
a_float const * | x, | ||
a_float const * | y ) |
ordinary least squares for simple linear regression
[in,out] | ctx | points to an instance of simple linear regression |
[in] | n | number of samples, x[n], y[n] |
[in] | x | predictor data, specified as a numeric vector |
[in] | y | response data, specified as a numeric vector |
void a_regress_simple_ols_ | ( | a_regress_simple * | ctx, |
a_size | n, | ||
a_float const * | x, | ||
a_float const * | y, | ||
a_float | x_mean, | ||
a_float | y_mean ) |
ordinary least squares for simple linear regression
[in,out] | ctx | points to an instance of simple linear regression |
[in] | n | number of samples, x[n], y[n] |
[in] | x | predictor data, specified as a numeric vector |
[in] | y | response data, specified as a numeric vector |
[in] | x_mean | mean of predictor data |
[in] | y_mean | mean of response data |
void a_regress_simple_olsx | ( | a_regress_simple * | ctx, |
a_size | n, | ||
a_float const * | x, | ||
a_float const * | y, | ||
a_float | x_mean ) |
ordinary least squares for simple linear regression
[in,out] | ctx | points to an instance of simple linear regression |
[in] | n | number of samples, x[n], y[n] |
[in] | x | predictor data, specified as a numeric vector |
[in] | y | response data, specified as a numeric vector |
[in] | x_mean | mean of predictor data |
void a_regress_simple_olsy | ( | a_regress_simple * | ctx, |
a_size | n, | ||
a_float const * | x, | ||
a_float const * | y, | ||
a_float | y_mean ) |
ordinary least squares for simple linear regression
[in,out] | ctx | points to an instance of simple linear regression |
[in] | n | number of samples, x[n], y[n] |
[in] | x | predictor data, specified as a numeric vector |
[in] | y | response data, specified as a numeric vector |
[in] | y_mean | mean of response data |
void a_regress_simple_zero | ( | a_regress_simple * | ctx | ) |
zeroing for simple linear regression
[in,out] | ctx | points to an instance of simple linear regression |