7#ifndef LIBA_REGRESS_LINEAR_H
8#define LIBA_REGRESS_LINEAR_H
20#if defined(__cplusplus)
114#if defined(__cplusplus)
118typedef struct a_regress_linear regress_linear;
130#if defined(__cplusplus)
162 return a_regress_linear_mgd(
this, n, x, y, err, delta, lrmax, lrmin, lrtim, epoch, batch);
double a_float
compiler built-in floating-point number type
Definition a.h:1003
void a_regress_linear_sgd(a_regress_linear *ctx, a_size n, a_float const *x, a_float const *y, a_float alpha)
stochastic gradient descent for linear regression
a_float a_regress_linear_mgd(a_regress_linear *ctx, a_size n, a_float const *x, a_float const *y, a_float *err, a_float delta, a_float lrmax, a_float lrmin, a_size lrtim, a_size epoch, a_size batch)
mini-batch gradient descent for linear regression
void a_regress_linear_gd(a_regress_linear *ctx, a_float const *input, a_float error, a_float alpha)
gradient descent for linear regression
void a_regress_linear_init(a_regress_linear *ctx, a_float *coef_p, a_size coef_n, a_float bias)
initialize for linear regression
void a_regress_linear_pdm(a_regress_linear const *ctx, a_size n, a_float const *x, a_float *pdm, a_float y_mean)
calculate prediction deviation from mean for linear regression
void a_regress_linear_zero(a_regress_linear *ctx)
zeroing for linear regression
void a_regress_linear_bgd(a_regress_linear *ctx, a_size n, a_float const *x, a_float const *err, a_float alpha)
batch gradient descent for linear regression
void a_regress_linear_err(a_regress_linear const *ctx, a_size n, a_float const *x, a_float const *y, a_float *err)
calculate residuals for linear regression
a_float a_regress_linear_eval(a_regress_linear const *ctx, a_float const *val)
calculate predicted value for linear regression
size_t a_size
unsigned integer type returned by the sizeof operator
Definition a.h:823
instance structure for linear regression
Definition regress_linear.h:126
a_float * coef_p
Definition regress_linear.h:127
a_float bias
Definition regress_linear.h:129
a_size coef_n
Definition regress_linear.h:128