projects
/
pspp
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Linreg.c: Remove QR decomposition optimisation.
[pspp]
/
src
/
math
/
linreg.c
diff --git
a/src/math/linreg.c
b/src/math/linreg.c
index be330bc40e211daa701243815e95072591c1b968..b5ccbc599921cad6b9fd1ecf02a5d24ef4abacb2 100644
(file)
--- a/
src/math/linreg.c
+++ b/
src/math/linreg.c
@@
-275,7
+275,7
@@
linreg_predict (const struct linreg *c, const double *vals, size_t n_vals)
size_t j;
double result;
size_t j;
double result;
- assert (n_vals = c->n_coeffs);
+ assert (n_vals =
=
c->n_coeffs);
if (vals == NULL || c == NULL)
{
return GSL_NAN;
if (vals == NULL || c == NULL)
{
return GSL_NAN;
@@
-432,6
+432,9
@@
linreg_fit (const gsl_matrix *cov, struct linreg *l)
l->sst = gsl_matrix_get (cov, cov->size1 - 1, cov->size2 - 1);
l->sst = gsl_matrix_get (cov, cov->size1 - 1, cov->size2 - 1);
+#if 0
+ /* This QR decomposition path seems to produce the incorrect
+ values. See https://savannah.gnu.org/bugs/?51373 */
if ((l->n_obs * l->n_obs > l->n_indeps) && (l->n_obs > REG_LARGE_DATA))
{
/*
if ((l->n_obs * l->n_obs > l->n_indeps) && (l->n_obs > REG_LARGE_DATA))
{
/*
@@
-440,6
+443,7
@@
linreg_fit (const gsl_matrix *cov, struct linreg *l)
linreg_fit_qr (cov, l);
}
else
linreg_fit_qr (cov, l);
}
else
+#endif
{
gsl_matrix *params = gsl_matrix_calloc (cov->size1, cov->size2);
gsl_matrix_memcpy (params, cov);
{
gsl_matrix *params = gsl_matrix_calloc (cov->size1, cov->size2);
gsl_matrix_memcpy (params, cov);