dswah / pyGAM

[HELP REQUESTED] Generalized Additive Models in Python
https://pygam.readthedocs.io
Apache License 2.0
871 stars 159 forks source link

Documentation typos in GAM formula #262

Open pjk645-zz opened 4 years ago

pjk645-zz commented 4 years ago

There are several instances where the functional form is shown as $$\beta_0 + f_1(X_1) + f_2(X_2, X3) + \ldots + f_M(X_N),$$ and I believe it should be $$\beta_0 + f_1(X_1) + f_2(X_2) + f_3( X_3) + \ldots + f_M(X_M),$$ or even this $$\beta_0 + f_1(X_1) +\ldots + f_M(X_M)$$ is probably sufficient.

pjk645-zz commented 4 years ago

From the pull request #263:

I changed the formulas to be single variable functions. I'm not sure if the previous intent was to imply the existence of the two variable 'tensor' functions. If that is in fact the case, then separating the two variable functions out from the single variable would be easier to read: $$\beta_0 + f_1(X_1) + \ldots + f_M(XM) + \sum{j=0}^{M} \sum{k\neq j} f{j,k}(X_j, X_k)$$ where the double indices imply the dependance on two variables. It should also probably be mentioned that having the two variable functionality is generalizing beyond your typical GAM, which I believe are only supposed to be single variable functions

shyamcody commented 4 years ago

I think the two-variable dependence essentially points out the existence of the tensor terms. So maybe it's not that of a typo to fix in that sense.