Documentation

This is machine translation

Translated by Microsoft
Mouseover text to see original. Click the button below to return to the English verison of the page.

Note: This page has been translated by MathWorks. Please click here
To view all translated materals including this page, select Japan from the country navigator on the bottom of this page.

Regularization

Ridge regression, lasso, elastic nets

For greater accuracy and link-function choices on low- through medium-dimensional data sets, fit a generalized linear model with a lasso penalty using lassoglm.

For reduced computation time on high-dimensional data sets that fit in the MATLAB® Workspace, train a binary, linear classification model, such as a regularized logistic regression model, using fitclinear. You can also efficiently train a multiclass error-correcting output codes (ECOC) model composed of logistic regression models using fitcecoc.

For nonlinear classification with big data, train a binary, Gaussian kernel classification model with regularized logistic regression using fitckernel.

Classes

ClassificationLinearLinear model for binary classification of high-dimensional data
ClassificationECOCMulticlass model for support vector machines or other classifiers
ClassificationKernelGaussian kernel classification model using feature expansion for big data
ClassificationPartitionedLinearCross-validated linear model for binary classification of high-dimensional data
ClassificationPartitionedLinearECOCCross-validated linear error-correcting output codes model for multiclass classification of high-dimensional data

Functions

lassoglmLasso or elastic net regularization for generalized linear model regression
fitclinearFit linear classification model to high-dimensional data
templateLinearLinear classification learner template
fitcecocFit multiclass models for support vector machines or other classifiers
predictPredict labels for linear classification models
fitckernelFit Gaussian kernel classification model using feature expansion for big data
predictPredict labels for Gaussian kernel classification model

Examples and How To

Regularize Poisson Regression

Identify and remove redundant predictors from a generalized linear model.

Regularize Logistic Regression

Regularize binomial regression.

Regularize Wide Data in Parallel

Regularize a model with many more predictors than observations.

Concepts

Lasso Regularization of Generalized Linear Models

The lasso algorithm produces a smaller model with fewer predictors. The related elastic net algorithm can be more accurate when predictors are highly correlated.

Was this topic helpful?