Main Content

本页翻译不是最新的。点击此处可查看最新英文版本。

广义线性回归

具有各种分布和联系函数的广义线性回归模型,包括逻辑回归

为了提高在中低维数据集上的准确度并增加联系函数选择,可以使用 fitglm 拟合广义线性回归模型。对于多项式逻辑回归,使用 fitmnr 拟合模型。

为了减少在高维数据集上的计算时间,可以使用 fitclinear 训练二类线性分类模型,例如逻辑回归模型。还可以使用 fitcecoc 高效地训练由逻辑回归模型组成的多类纠错输出编码 (ECOC) 模型。

对于大数据的非线性分类,可以使用 fitckernel 训练带逻辑回归的二类高斯核分类模型。

模块

ClassificationLinear PredictClassify observations using linear classification model (自 R2023a 起)

函数

全部展开

创建 GeneralizedLinearModel 对象

fitglmCreate generalized linear regression model
stepwiseglmCreate generalized linear regression model by stepwise regression

创建 CompactGeneralizedLinearModel 对象

compactCompact generalized linear regression model

在广义线性模型中添加或删除项

addTermsAdd terms to generalized linear regression model
removeTermsRemove terms from generalized linear regression model
stepImprove generalized linear regression model by adding or removing terms

预测响应

fevalPredict responses of generalized linear regression model using one input for each predictor
predictPredict responses of generalized linear regression model
randomSimulate responses with random noise for generalized linear regression model

计算广义线性模型

coefCIConfidence intervals of coefficient estimates of generalized linear regression model
coefTestLinear hypothesis test on generalized linear regression model coefficients
devianceTestAnalysis of deviance for generalized linear regression model
partialDependenceCompute partial dependence (自 R2020b 起)

可视化广义线性模型和摘要统计量

plotDiagnosticsPlot observation diagnostics of generalized linear regression model
plotPartialDependenceCreate partial dependence plot (PDP) and individual conditional expectation (ICE) plots
plotResidualsPlot residuals of generalized linear regression model
plotSlicePlot of slices through fitted generalized linear regression surface

收集广义线性模型的属性

gatherGather properties of Statistics and Machine Learning Toolbox object from GPU (自 R2020b 起)

创建 MultinomialRegression 对象

fitmnrFit multinomial regression model (自 R2023a 起)

使用 MultinomialRegression 对象

coefCIConfidence intervals for coefficient estimates of multinomial regression model (自 R2023a 起)
coefTestLinear hypothesis test on multinomial regression model coefficients (自 R2023a 起)
fevalPredict responses of multinomial regression model using one input for each predictor (自 R2023a 起)
partialDependenceCompute partial dependence (自 R2020b 起)
plotPartialDependenceCreate partial dependence plot (PDP) and individual conditional expectation (ICE) plots
plotResidualsPlot residuals of multinomial regression model (自 R2023a 起)
plotSlicePlot of slices through fitted multinomial regression surface (自 R2023a 起)
predictPredict responses of multinomial regression model (自 R2023a 起)
randomGenerate random responses from fitted multinomial regression model (自 R2023a 起)
testDevianceDeviance test for multinomial regression model (自 R2023a 起)

创建对象

fitclinearFit binary linear classifier to high-dimensional data
fitcecocFit multiclass models for support vector machines or other classifiers
fitckernelFit binary Gaussian kernel classifier using random feature expansion
templateLinearLinear learner template

预测标签

predictPredict labels for linear classification models
predictClassify observations using multiclass error-correcting output codes (ECOC) model
predictPredict labels for Gaussian kernel classification model
glmfitFit generalized linear regression model
glmvalGeneralized linear model values

对象

全部展开

GeneralizedLinearModelGeneralized linear regression model class
CompactGeneralizedLinearModelCompact generalized linear regression model class
MultinomialRegressionMultinomial regression model (自 R2023a 起)
ClassificationLinearLinear model for binary classification of high-dimensional data
ClassificationECOCMulticlass model for support vector machines (SVMs) and other classifiers
ClassificationKernelGaussian kernel classification model using random feature expansion
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

主题

广义线性回归

多项式逻辑回归

  • Multinomial Models for Nominal Responses
    A nominal response variable has a restricted set of possible values with no natural order between them. A nominal response model explains and predicts the probability that an observation is in each category of a categorical response variable.
  • Multinomial Models for Ordinal Responses
    An ordinal response variable has a restricted set of possible values that fall into a natural order. An ordinal response model describes the relationship between the cumulative probabilities of the categories and predictor variables.
  • Multinomial Models for Hierarchical Responses
    A hierarchical multinomial response variable (also known as a sequential or nested multinomial response) has a restricted set of possible values that fall into hierarchical categories. The hierarchical multinomial regression models are extensions of binary regression models based on conditional binary observations.