فهرست فصل‌ها دانلود آرشیوناشر

scikit-learn Docs · نسخهٔ 5e9184e53cd3 · BSD-3-Clause

  • The generalized linear models (GLM) linear_model.GammaRegressor,

linear_model.PoissonRegressor and linear_model.TweedieRegressor are now able to fit L1 (Lasso) and Elastic-Net penalties with the new parameter l1_ratio together with the 2 new solvers "newton-cd" and "newton-cd-gram". These new solvers are also available for linear_model.LogisticRegression. They are based on the Newton solver infrastructure introduced for "newton-cholesky" and take advantage of the already available and fast (e.g. via gap safe screening rules) coordinate descent solvers of ElasticNet.

  • "newton-cd-gram" constructs the full Hessian (gram) matrix and then uses

ElasticNet(precompute=True) as the inner solver. It is a good choice for n_samples >> n_features (at least whenever l1_ratio > 0).

  • "newton-cd" avoids constructing the full Hessian matrix, but formulates the

minimization problem for the inner solver as a penalized least squares problem (which amounts to taking the square root of the Hessian; this is even done with great care for multiclass/multinomial logistic regression using an analytic LDL decomposition of the multinomial covariance matrix per sample) and then uses ElasticNet(precompute=False) on it. It is a good choice for n_features > n_samples (at least whenever l1_ratio > 0).

By Christian Lorentzen <lorentzenchr>. 34561, 34377, 34523.