本页对应的英文页面已更新,但尚未翻译。 若要查看最新内容,请点击此处访问英文页面。
为了提高在中低维数据集上的准确度,可以使用 fitlm
拟合线性回归模型。
为了减少在高维数据集上的计算时间,可以使用 fitrlinear
拟合线性回归模型。
Regression Learner | Train regression models to predict data using supervised machine learning |
LinearModel | Linear regression model |
CompactLinearModel | Compact linear regression model |
RegressionLinear | Linear regression model for high-dimensional data |
RegressionPartitionedLinear | Cross-validated linear regression model for high-dimensional data |
What Is a Linear Regression Model?
Regression models describe the relationship between a dependent variable and one or more independent variables.
Fit a linear regression model and examine the result.
In stepwise regression, predictors are automatically added to or trimmed from a model.
Reduce Outlier Effects Using Robust Regression
Fit a robust model that is less sensitive than ordinary least squares to large changes in small parts of the data.
Choose a regression function depending on the type of regression problem, and update legacy code using new fitting functions.
Summary of Output and Diagnostic Statistics
Evaluate a fitted model by using model properties and object functions.
Wilkinson notation provides a way to describe regression and repeated measures models without specifying coefficient values.
Import and prepare data, fit a linear regression model, test and improve its quality, and share the model.
Interpret Linear Regression Results
Display and interpret linear regression output statistics.
Linear Regression with Interaction Effects
Construct and analyze a linear regression model with interaction effects and interpret the results.
Linear Regression Using Tables
This example shows how to perform linear and stepwise regression analyses using tables.
Linear Regression with Categorical Covariates
Perform a regression with categorical covariates using categorical arrays and
fitlm
.
This example shows how to visualize and analyze time series data using a timeseries
object and the regress
function.
Train linear regression model using fitlm
to analyze
in-memory data and out-of-memory data.
Partial least squares (PLS) constructs new predictor variables as linear combinations of the original predictor variables, while considering the observed response values, leading to a parsimonious model with reliable predictive power.
此示例说明如何应用偏最小二乘回归 (PLSR) 和主成分回归 (PCR),并讨论这两种方法的有效性。当存在大量预测变量并且它们高度相关甚至共线时,PLSR 和 PCR 都可以作为建模响应变量的方法。这两种方法都将新的预测变量(称为成分)构建为原始预测变量的线性组合,但它们构建这些成分的方式不同。PCR 创建成分来解释在预测变量中观察到的变异性,而根本不考虑响应变量。而 PLSR 会考虑响应变量,因此常使模型能够拟合具有更少成分的响应变量。从实际应用上来说,这能否最终转化为更简约的模型要视情况而定。