From: John Darrington Date: Thu, 27 Jun 2013 18:34:54 +0000 (+0200) Subject: linreg: Remove some unused features X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=114713caa4d78e5ce3c75abaf6afa677de0db269;p=pspp linreg: Remove some unused features --- diff --git a/src/math/linreg.c b/src/math/linreg.c index 47d21cf8f5..92617aeadf 100644 --- a/src/math/linreg.c +++ b/src/math/linreg.c @@ -86,9 +86,6 @@ linreg_alloc (const struct variable *depvar, const struct variable **indep_vars, c->indep_means = gsl_vector_alloc (p); c->indep_std = gsl_vector_alloc (p); - c->ss_indeps = gsl_vector_alloc (p); /* Sums of squares for the - model parameters. - */ c->n_obs = n; c->n_indeps = p; c->n_coeffs = p; @@ -99,7 +96,6 @@ linreg_alloc (const struct variable *depvar, const struct variable **indep_vars, c->dfe = c->dft - c->dfm; c->intercept = 0.0; c->depvar_mean = 0.0; - c->depvar_std = 0.0; /* Default settings. */ @@ -124,7 +120,6 @@ linreg_unref (linreg *c) { gsl_vector_free (c->indep_means); gsl_vector_free (c->indep_std); - gsl_vector_free (c->ss_indeps); gsl_matrix_free (c->cov); free (c->indep_vars); free (c->coeff); @@ -249,18 +244,6 @@ linreg_residual (const linreg *c, double obs, const double *vals, size_t n_vals) return (obs - linreg_predict (c, vals, n_vals)); } -double linreg_get_indep_variable_sd (linreg *c, size_t j) -{ - assert (c != NULL); - return gsl_vector_get (c->indep_std, j); -} - -void linreg_set_indep_variable_sd (linreg *c, size_t j, double s) -{ - assert (c != NULL); - gsl_vector_set (c->indep_std, j, s); -} - /* Mean of the independent variable. */ diff --git a/src/math/linreg.h b/src/math/linreg.h index e53a02956e..c4bec321b6 100644 --- a/src/math/linreg.h +++ b/src/math/linreg.h @@ -115,7 +115,6 @@ struct linreg_struct column of the design matrix. */ double depvar_mean; - double depvar_std; gsl_vector *indep_means; gsl_vector *indep_std; @@ -123,8 +122,6 @@ struct linreg_struct Sums of squares. */ double ssm; /* Sums of squares for the overall model. */ - gsl_vector *ss_indeps; /* Sums of squares from each - independent variable. */ double sst; /* Sum of squares total. */ double sse; /* Sum of squares error. */ double mse; /* Mean squared error. This is just sse / @@ -171,11 +168,6 @@ double linreg_residual (const linreg *, double, const double *, size_t); const struct variable ** linreg_get_vars (const linreg *); -/* - Return or set the standard deviation of the independent variable. - */ -double linreg_get_indep_variable_sd (linreg *, size_t); -void linreg_set_indep_variable_sd (linreg *, size_t, double); /* Mean of the independent variable. */