.. _sphx_glr_auto_examples_linear_model:
.. _linear_examples:
Generalized Linear Models
-------------------------
Examples concerning the :mod:`sklearn.linear_model` module.
.. raw:: html
.. raw:: html
.. only:: html
.. image:: /auto_examples/linear_model/images/thumb/sphx_glr_plot_ard_thumb.png
:alt:
:ref:`sphx_glr_auto_examples_linear_model_plot_ard.py`
.. raw:: html
Comparing Linear Bayesian Regressors
.. raw:: html
.. only:: html
.. image:: /auto_examples/linear_model/images/thumb/sphx_glr_plot_sgd_comparison_thumb.png
:alt:
:ref:`sphx_glr_auto_examples_linear_model_plot_sgd_comparison.py`
.. raw:: html
Comparing various online solvers
.. raw:: html
.. only:: html
.. image:: /auto_examples/linear_model/images/thumb/sphx_glr_plot_bayesian_ridge_curvefit_thumb.png
:alt:
:ref:`sphx_glr_auto_examples_linear_model_plot_bayesian_ridge_curvefit.py`
.. raw:: html
Curve Fitting with Bayesian Ridge Regression
.. raw:: html
.. only:: html
.. image:: /auto_examples/linear_model/images/thumb/sphx_glr_plot_sgd_early_stopping_thumb.png
:alt:
:ref:`sphx_glr_auto_examples_linear_model_plot_sgd_early_stopping.py`
.. raw:: html
Early stopping of Stochastic Gradient Descent
.. raw:: html
.. only:: html
.. image:: /auto_examples/linear_model/images/thumb/sphx_glr_plot_elastic_net_precomputed_gram_matrix_with_weighted_samples_thumb.png
:alt:
:ref:`sphx_glr_auto_examples_linear_model_plot_elastic_net_precomputed_gram_matrix_with_weighted_samples.py`
.. raw:: html
Fitting an Elastic Net with a precomputed Gram Matrix and Weighted Samples
.. raw:: html
.. only:: html
.. image:: /auto_examples/linear_model/images/thumb/sphx_glr_plot_huber_vs_ridge_thumb.png
:alt:
:ref:`sphx_glr_auto_examples_linear_model_plot_huber_vs_ridge.py`
.. raw:: html
HuberRegressor vs Ridge on dataset with strong outliers
.. raw:: html
.. only:: html
.. image:: /auto_examples/linear_model/images/thumb/sphx_glr_plot_multi_task_lasso_support_thumb.png
:alt:
:ref:`sphx_glr_auto_examples_linear_model_plot_multi_task_lasso_support.py`
.. raw:: html
Joint feature selection with multi-task Lasso
.. raw:: html
.. only:: html
.. image:: /auto_examples/linear_model/images/thumb/sphx_glr_plot_logistic_l1_l2_sparsity_thumb.png
:alt:
:ref:`sphx_glr_auto_examples_linear_model_plot_logistic_l1_l2_sparsity.py`
.. raw:: html
L1 Penalty and Sparsity in Logistic Regression
.. raw:: html
.. only:: html
.. image:: /auto_examples/linear_model/images/thumb/sphx_glr_plot_lasso_and_elasticnet_thumb.png
:alt:
:ref:`sphx_glr_auto_examples_linear_model_plot_lasso_and_elasticnet.py`
.. raw:: html
L1-based models for Sparse Signals
.. raw:: html
.. only:: html
.. image:: /auto_examples/linear_model/images/thumb/sphx_glr_plot_lasso_coordinate_descent_path_thumb.png
:alt:
:ref:`sphx_glr_auto_examples_linear_model_plot_lasso_coordinate_descent_path.py`
.. raw:: html
Lasso and Elastic Net
.. raw:: html
.. only:: html
.. image:: /auto_examples/linear_model/images/thumb/sphx_glr_plot_lasso_lars_ic_thumb.png
:alt:
:ref:`sphx_glr_auto_examples_linear_model_plot_lasso_lars_ic.py`
.. raw:: html
Lasso model selection via information criteria
.. raw:: html
.. only:: html
.. image:: /auto_examples/linear_model/images/thumb/sphx_glr_plot_lasso_model_selection_thumb.png
:alt:
:ref:`sphx_glr_auto_examples_linear_model_plot_lasso_model_selection.py`
.. raw:: html
Lasso model selection: AIC-BIC / cross-validation
.. raw:: html
.. only:: html
.. image:: /auto_examples/linear_model/images/thumb/sphx_glr_plot_lasso_dense_vs_sparse_data_thumb.png
:alt:
:ref:`sphx_glr_auto_examples_linear_model_plot_lasso_dense_vs_sparse_data.py`
.. raw:: html
Lasso on dense and sparse data
.. raw:: html
.. only:: html
.. image:: /auto_examples/linear_model/images/thumb/sphx_glr_plot_lasso_lars_thumb.png
:alt:
:ref:`sphx_glr_auto_examples_linear_model_plot_lasso_lars.py`
.. raw:: html
Lasso path using LARS
.. raw:: html
.. only:: html
.. image:: /auto_examples/linear_model/images/thumb/sphx_glr_plot_ols_thumb.png
:alt:
:ref:`sphx_glr_auto_examples_linear_model_plot_ols.py`
.. raw:: html
Linear Regression Example
.. raw:: html
.. only:: html
.. image:: /auto_examples/linear_model/images/thumb/sphx_glr_plot_iris_logistic_thumb.png
:alt:
:ref:`sphx_glr_auto_examples_linear_model_plot_iris_logistic.py`
.. raw:: html
Logistic Regression 3-class Classifier
.. raw:: html
.. only:: html
.. image:: /auto_examples/linear_model/images/thumb/sphx_glr_plot_logistic_thumb.png
:alt:
:ref:`sphx_glr_auto_examples_linear_model_plot_logistic.py`
.. raw:: html
Logistic function
.. raw:: html
.. only:: html
.. image:: /auto_examples/linear_model/images/thumb/sphx_glr_plot_sparse_logistic_regression_mnist_thumb.png
:alt:
:ref:`sphx_glr_auto_examples_linear_model_plot_sparse_logistic_regression_mnist.py`
.. raw:: html
MNIST classification using multinomial logistic + L1
.. raw:: html
.. only:: html
.. image:: /auto_examples/linear_model/images/thumb/sphx_glr_plot_sparse_logistic_regression_20newsgroups_thumb.png
:alt:
:ref:`sphx_glr_auto_examples_linear_model_plot_sparse_logistic_regression_20newsgroups.py`
.. raw:: html
Multiclass sparse logistic regression on 20newgroups
.. raw:: html
.. only:: html
.. image:: /auto_examples/linear_model/images/thumb/sphx_glr_plot_nnls_thumb.png
:alt:
:ref:`sphx_glr_auto_examples_linear_model_plot_nnls.py`
.. raw:: html
Non-negative least squares
.. raw:: html
.. only:: html
.. image:: /auto_examples/linear_model/images/thumb/sphx_glr_plot_sgdocsvm_vs_ocsvm_thumb.png
:alt:
:ref:`sphx_glr_auto_examples_linear_model_plot_sgdocsvm_vs_ocsvm.py`
.. raw:: html
One-Class SVM versus One-Class SVM using Stochastic Gradient Descent
.. raw:: html
.. only:: html
.. image:: /auto_examples/linear_model/images/thumb/sphx_glr_plot_ols_ridge_variance_thumb.png
:alt:
:ref:`sphx_glr_auto_examples_linear_model_plot_ols_ridge_variance.py`
.. raw:: html
Ordinary Least Squares and Ridge Regression Variance
.. raw:: html
.. only:: html
.. image:: /auto_examples/linear_model/images/thumb/sphx_glr_plot_omp_thumb.png
:alt:
:ref:`sphx_glr_auto_examples_linear_model_plot_omp.py`
.. raw:: html
Orthogonal Matching Pursuit
.. raw:: html
.. only:: html
.. image:: /auto_examples/linear_model/images/thumb/sphx_glr_plot_ridge_path_thumb.png
:alt:
:ref:`sphx_glr_auto_examples_linear_model_plot_ridge_path.py`
.. raw:: html
Plot Ridge coefficients as a function of the regularization
.. raw:: html
.. only:: html
.. image:: /auto_examples/linear_model/images/thumb/sphx_glr_plot_sgd_iris_thumb.png
:alt:
:ref:`sphx_glr_auto_examples_linear_model_plot_sgd_iris.py`
.. raw:: html
Plot multi-class SGD on the iris dataset
.. raw:: html
.. only:: html
.. image:: /auto_examples/linear_model/images/thumb/sphx_glr_plot_logistic_multinomial_thumb.png
:alt:
:ref:`sphx_glr_auto_examples_linear_model_plot_logistic_multinomial.py`
.. raw:: html
Plot multinomial and One-vs-Rest Logistic Regression
.. raw:: html
.. only:: html
.. image:: /auto_examples/linear_model/images/thumb/sphx_glr_plot_poisson_regression_non_normal_loss_thumb.png
:alt:
:ref:`sphx_glr_auto_examples_linear_model_plot_poisson_regression_non_normal_loss.py`
.. raw:: html
Poisson regression and non-normal loss
.. raw:: html
.. only:: html
.. image:: /auto_examples/linear_model/images/thumb/sphx_glr_plot_polynomial_interpolation_thumb.png
:alt:
:ref:`sphx_glr_auto_examples_linear_model_plot_polynomial_interpolation.py`
.. raw:: html
Polynomial and Spline interpolation
.. raw:: html
.. only:: html
.. image:: /auto_examples/linear_model/images/thumb/sphx_glr_plot_quantile_regression_thumb.png
:alt:
:ref:`sphx_glr_auto_examples_linear_model_plot_quantile_regression.py`
.. raw:: html
Quantile regression
.. raw:: html
.. only:: html
.. image:: /auto_examples/linear_model/images/thumb/sphx_glr_plot_logistic_path_thumb.png
:alt:
:ref:`sphx_glr_auto_examples_linear_model_plot_logistic_path.py`
.. raw:: html
Regularization path of L1- Logistic Regression
.. raw:: html
.. only:: html
.. image:: /auto_examples/linear_model/images/thumb/sphx_glr_plot_ridge_coeffs_thumb.png
:alt:
:ref:`sphx_glr_auto_examples_linear_model_plot_ridge_coeffs.py`
.. raw:: html
Ridge coefficients as a function of the L2 Regularization
.. raw:: html
.. only:: html
.. image:: /auto_examples/linear_model/images/thumb/sphx_glr_plot_robust_fit_thumb.png
:alt:
:ref:`sphx_glr_auto_examples_linear_model_plot_robust_fit.py`
.. raw:: html
Robust linear estimator fitting
.. raw:: html
.. only:: html
.. image:: /auto_examples/linear_model/images/thumb/sphx_glr_plot_ransac_thumb.png
:alt:
:ref:`sphx_glr_auto_examples_linear_model_plot_ransac.py`
.. raw:: html
Robust linear model estimation using RANSAC
.. raw:: html
.. only:: html
.. image:: /auto_examples/linear_model/images/thumb/sphx_glr_plot_sgd_separating_hyperplane_thumb.png
:alt:
:ref:`sphx_glr_auto_examples_linear_model_plot_sgd_separating_hyperplane.py`
.. raw:: html
SGD: Maximum margin separating hyperplane
.. raw:: html
.. only:: html
.. image:: /auto_examples/linear_model/images/thumb/sphx_glr_plot_sgd_penalties_thumb.png
:alt:
:ref:`sphx_glr_auto_examples_linear_model_plot_sgd_penalties.py`
.. raw:: html
SGD: Penalties
.. raw:: html
.. only:: html
.. image:: /auto_examples/linear_model/images/thumb/sphx_glr_plot_sgd_weighted_samples_thumb.png
:alt:
:ref:`sphx_glr_auto_examples_linear_model_plot_sgd_weighted_samples.py`
.. raw:: html
SGD: Weighted samples
.. raw:: html
.. only:: html
.. image:: /auto_examples/linear_model/images/thumb/sphx_glr_plot_sgd_loss_functions_thumb.png
:alt:
:ref:`sphx_glr_auto_examples_linear_model_plot_sgd_loss_functions.py`
.. raw:: html
SGD: convex loss functions
.. raw:: html
.. only:: html
.. image:: /auto_examples/linear_model/images/thumb/sphx_glr_plot_ols_3d_thumb.png
:alt:
:ref:`sphx_glr_auto_examples_linear_model_plot_ols_3d.py`
.. raw:: html
Sparsity Example: Fitting only features 1 and 2
.. raw:: html
.. only:: html
.. image:: /auto_examples/linear_model/images/thumb/sphx_glr_plot_theilsen_thumb.png
:alt:
:ref:`sphx_glr_auto_examples_linear_model_plot_theilsen.py`
.. raw:: html
Theil-Sen Regression
.. raw:: html
.. only:: html
.. image:: /auto_examples/linear_model/images/thumb/sphx_glr_plot_tweedie_regression_insurance_claims_thumb.png
:alt:
:ref:`sphx_glr_auto_examples_linear_model_plot_tweedie_regression_insurance_claims.py`
.. raw:: html
Tweedie regression on insurance claims
.. raw:: html
.. toctree::
:hidden:
/auto_examples/linear_model/plot_ard
/auto_examples/linear_model/plot_sgd_comparison
/auto_examples/linear_model/plot_bayesian_ridge_curvefit
/auto_examples/linear_model/plot_sgd_early_stopping
/auto_examples/linear_model/plot_elastic_net_precomputed_gram_matrix_with_weighted_samples
/auto_examples/linear_model/plot_huber_vs_ridge
/auto_examples/linear_model/plot_multi_task_lasso_support
/auto_examples/linear_model/plot_logistic_l1_l2_sparsity
/auto_examples/linear_model/plot_lasso_and_elasticnet
/auto_examples/linear_model/plot_lasso_coordinate_descent_path
/auto_examples/linear_model/plot_lasso_lars_ic
/auto_examples/linear_model/plot_lasso_model_selection
/auto_examples/linear_model/plot_lasso_dense_vs_sparse_data
/auto_examples/linear_model/plot_lasso_lars
/auto_examples/linear_model/plot_ols
/auto_examples/linear_model/plot_iris_logistic
/auto_examples/linear_model/plot_logistic
/auto_examples/linear_model/plot_sparse_logistic_regression_mnist
/auto_examples/linear_model/plot_sparse_logistic_regression_20newsgroups
/auto_examples/linear_model/plot_nnls
/auto_examples/linear_model/plot_sgdocsvm_vs_ocsvm
/auto_examples/linear_model/plot_ols_ridge_variance
/auto_examples/linear_model/plot_omp
/auto_examples/linear_model/plot_ridge_path
/auto_examples/linear_model/plot_sgd_iris
/auto_examples/linear_model/plot_logistic_multinomial
/auto_examples/linear_model/plot_poisson_regression_non_normal_loss
/auto_examples/linear_model/plot_polynomial_interpolation
/auto_examples/linear_model/plot_quantile_regression
/auto_examples/linear_model/plot_logistic_path
/auto_examples/linear_model/plot_ridge_coeffs
/auto_examples/linear_model/plot_robust_fit
/auto_examples/linear_model/plot_ransac
/auto_examples/linear_model/plot_sgd_separating_hyperplane
/auto_examples/linear_model/plot_sgd_penalties
/auto_examples/linear_model/plot_sgd_weighted_samples
/auto_examples/linear_model/plot_sgd_loss_functions
/auto_examples/linear_model/plot_ols_3d
/auto_examples/linear_model/plot_theilsen
/auto_examples/linear_model/plot_tweedie_regression_insurance_claims