MCPcopy Create free account
hub / github.com/BoevaLab/FREEC / lrprocess

Function lrprocess

src/linreg.cpp:459–472  ·  view source on GitHub ↗

Procesing INPUT PARAMETERS: LM - linear model X - input vector, array[0..NVars-1]. Result: value of linear model regression estimate -- ALGLIB -- Copyright 03.09.2008 by Bochkanov Sergey *************************************************************************/

Source from the content-addressed store, hash-verified

457 Copyright 03.09.2008 by Bochkanov Sergey
458*************************************************************************/
459double lrprocess(const linearmodel& lm, const ap::real_1d_array& x)
460{
461 double result;
462 double v;
463 int offs;
464 int nvars;
465
466 ap::ap_error::make_assertion(ap::round_f(lm.w(1))==lrvnum, "LINREG: Incorrect LINREG version!");
467 nvars = ap::round_f(lm.w(2));
468 offs = ap::round_f(lm.w(3));
469 v = ap::vdotproduct(&x(0), 1, &lm.w(offs), 1, ap::vlen(0,nvars-1));
470 result = v+lm.w(offs+nvars);
471 return result;
472}
473
474
475/*************************************************************************

Callers

nothing calls this directly

Calls 2

round_fFunction · 0.85
vdotproductFunction · 0.85

Tested by

no test coverage detected