X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=src%2Fmath%2Flinreg%2Fpredict.c;h=911846870e2dea478093a9dc288acb89979d3627;hb=09907ebe926441d6a6834f358844e10358ea86e2;hp=8eba054a83faee575416447c2feb83a4e087c7f2;hpb=a94d5054363ca725a6810780b3621f064956929a;p=pspp-builds.git diff --git a/src/math/linreg/predict.c b/src/math/linreg/predict.c index 8eba054a..91184687 100644 --- a/src/math/linreg/predict.c +++ b/src/math/linreg/predict.c @@ -51,7 +51,7 @@ pspp_linreg_predict (const struct variable **predictors, { const pspp_linreg_cache *c = c_; int j; - size_t next_coef = 1; + size_t next_coef = 0; const struct pspp_coeff **coef_list; const struct pspp_coeff *coe; double result; @@ -67,8 +67,7 @@ pspp_linreg_predict (const struct variable **predictors, return c->depvar_mean; } coef_list = xnmalloc (c->n_coeffs, sizeof (*coef_list)); - *coef_list = c->coeff[0]; - result = c->coeff[0]->estimate; /* Intercept. */ + result = c->intercept; /* The loops guard against the possibility that the caller passed us