@@ -816,14 +816,14 @@ Generalized linear regression
816
816
=============================
817
817
818
818
:class: `GeneralizedLinearRegressor ` generalizes the :ref: `elastic_net ` in two
819
- ways [1 ]_. First, the predicted values :math: `\hat {y}` are linked to a linear
819
+ ways [8 ]_. First, the predicted values :math: `\hat {y}` are linked to a linear
820
820
combination of the input variables :math: `X` via an inverse link function
821
821
:math: `h` as
822
822
823
823
.. math :: \hat{y}(w, x) = h(xw) = h(w_0 + w_1 x_1 + ... + w_p x_p).
824
824
825
825
Secondly, the squared loss function is replaced by the deviance :math: `D` of an
826
- exponential dispersion model (EDM) [2 ]_. The objective function beeing minimized
826
+ exponential dispersion model (EDM) [9 ]_. The objective function beeing minimized
827
827
becomes
828
828
829
829
.. math :: \frac{1}{2s}D(y, \hat{y}) + \alpha \rho ||P_1w||_1
@@ -850,7 +850,8 @@ it is convenient to apply a link function different from the identity link
850
850
:math: `h(Xw)=\exp (Xw)`.
851
851
852
852
Note that the feature matrix `X ` should be standardized before fitting. This
853
- ensures that the penalty treats features equally.
853
+ ensures that the penalty treats features equally. The estimator can be used as
854
+ follows::
854
855
855
856
>>> from sklearn import linear_model
856
857
>>> reg = linear_model.GeneralizedLinearRegressor(alpha=0.5, l1_ratio=0)
@@ -905,7 +906,7 @@ Two remarks:
905
906
906
907
* The deviances for at least Normal, Poisson and Gamma distributions are
907
908
strictly consistent scoring functions for the mean :math: `\mu `, see Eq.
908
- (19)-(20) in [3 ]_.
909
+ (19)-(20) in [10 ]_.
909
910
910
911
* If you want to model a frequency, i.e. counts per exposure (time, volume, ...)
911
912
you can do so by a Poisson distribution and passing
@@ -915,12 +916,12 @@ Two remarks:
915
916
916
917
.. topic :: References:
917
918
918
- .. [1 ] McCullagh, Peter; Nelder, John (1989). Generalized Linear Models, Second Edition. Boca Raton: Chapman and Hall/CRC. ISBN 0-412-31760-5.
919
+ .. [8 ] McCullagh, Peter; Nelder, John (1989). Generalized Linear Models, Second Edition. Boca Raton: Chapman and Hall/CRC. ISBN 0-412-31760-5.
919
920
920
- .. [2 ] Jørgensen, B. (1992). The theory of exponential dispersion models and analysis of deviance. Monografias de matemática, no. 51.
921
+ .. [9 ] Jørgensen, B. (1992). The theory of exponential dispersion models and analysis of deviance. Monografias de matemática, no. 51.
921
922
See also `Exponential dispersion model. <https://en.wikipedia.org/wiki/Exponential_dispersion_model >`_
922
923
923
- .. [3 ] Gneiting, T. (2010). `Making and Evaluating Point Forecasts. <https://arxiv.org/pdf/0912.0902.pdf >`_
924
+ .. [10 ] Gneiting, T. (2010). `Making and Evaluating Point Forecasts. <https://arxiv.org/pdf/0912.0902.pdf >`_
924
925
925
926
Stochastic Gradient Descent - SGD
926
927
=================================
0 commit comments