Some examples of regression function: Polynomial of 2nd degree (parabola)
// y=b0*x*x + b1*x + b2 function SimpleParabola(const B: TVec; X: double): double; begin SimpleParabola := b[0]*Sqr(x) + b[1]*x + b[2]; end;
double __fastcall SimpleParabola(TVec * const b, double x) { double* B = b->PValues1D(0); return B[0]*x*x + B[1]*x + B[2]; }
Copyright (c) 1999-2025 by Dew Research. All rights reserved.
|