I want to move coefficient.[ch] and design-matrix.[ch] to src/data. Ben and I thought this might be a good idea after discussing it on IRC, so I thought I would elicit more discussion here.
coefficient.[ch] and design-matrix.[ch] don't do any computations. They're purpose to offer some common, data-shuffling functionality to model-fitting procedures in src/math/. Right now the only model-fitting code in src/math is linreg, but we will eventually want code for logistic regression and other models. They all need design matrices and coefficients to match variables to columns to coefficients. That matching goes pretty much the same for each kind of model. So it seems that a model-fitting directory in src/math should depend on coefficient.[ch] and design-matrix.[ch]. coefficient.[ch] and design-matrix.[ch] probably should not have to know about model-fitting: there are many kinds of models, and for each of them, a coefficient means the same thing, and a design matrix means the same thing, independently of what kind of model it is. Furthermore, coefficients and design-matrix code doesn't have any math in it. There is no linear algebra, or descent algorithms, etc. That code just takes a coefficient and returns the variable it matches, or vice versa, or takes a variable and finds its corresponding columns in a design matrix. So putting this in src/math doesn't seem as appropriate as putting it in a place like src/data. coefficient.c depends on linreg.h, but that could be changed. By contrast, design-matrix.c depends on src/data/category.h, and I don't think I could eliminate this dependency. So how does everyone feel about moving coefficient.[ch] and design-matrix.[ch] to src/data? If it sounds good, I'll post a patch. -Jason _______________________________________________ pspp-dev mailing list [email protected] http://lists.gnu.org/mailman/listinfo/pspp-dev
