Generalized Linear Model with a Tweedie distribution.
This estimator can be used to model different GLMs depending on the ``power`` parameter, which determines the underlying distribution.
Read more in the :ref:`User Guide <Generalized_linear_regression>`.
Parameters ---------- power : float, default=0 The power determines the underlying target distribution according to the following table:
+-------+------------------------+ | Power | Distribution | +=======+========================+ | 0 | Normal | +-------+------------------------+ | 1 | Poisson | +-------+------------------------+ | (1,2) | Compound Poisson Gamma | +-------+------------------------+ | 2 | Gamma | +-------+------------------------+ | 3 | Inverse Gaussian | +-------+------------------------+
For ``0 < power < 1``, no distribution exists.
alpha : float, default=1 Constant that multiplies the penalty term and thus determines the regularization strength. ``alpha = 0`` is equivalent to unpenalized GLMs. In this case, the design matrix `X` must have full column rank (no collinearities).
link : 'auto', 'identity', 'log'
, default='auto' The link function of the GLM, i.e. mapping from linear predictor `X @ coeff + intercept` to prediction `y_pred`. Option 'auto' sets the link depending on the chosen family as follows:
- 'identity' for Normal distribution
- 'log' for Poisson, Gamma and Inverse Gaussian distributions
fit_intercept : bool, default=True Specifies if a constant (a.k.a. bias or intercept) should be added to the linear predictor (X @ coef + intercept).
max_iter : int, default=100 The maximal number of iterations for the solver.
tol : float, default=1e-4 Stopping criterion. For the lbfgs solver, the iteration will stop when ``max |g_j|, j = 1, ..., d
<= tol`` where ``g_j`` is the j-th component of the gradient (derivative) of the objective function.
warm_start : bool, default=False If set to ``True``, reuse the solution of the previous call to ``fit`` as initialization for ``coef_`` and ``intercept_`` .
verbose : int, default=0 For the lbfgs solver set verbose to any positive number for verbosity.
Attributes ---------- coef_ : array of shape (n_features,) Estimated coefficients for the linear predictor (`X @ coef_ + intercept_`) in the GLM.
intercept_ : float Intercept (a.k.a. bias) added to linear predictor.
n_iter_ : int Actual number of iterations used in the solver.