Equation selection using subset regression: regsubsets

版本 1.0.0.0 (65.2 KB) 作者: Bill Whiten
Finds multiple linear regression equations relating measurement data to results. See regtest.html
108.0 次下载
更新时间 2017/9/28

查看许可证

Regression takes a matrix of data columns A (independent variables) and using a linear combination of these columns predicts a vector b of dependent values. Each row of A can be test measurement values and the corresponding element of b the result from the test. So the regression equations predicts the result of the test from the measurement values. A column of ones in A provides a constant term in the regression equation.
Formally we calculate x so that the sum of square errors Ax-b is minimised. A small sum of squares means Ax is a good predictor of b.

The back slash operator \ (as x=A\b) or the function linfit ([x,xse]=linfit(A,b)) provides the solution in simple cases. Often many different dependent variables are recorded and it is not known which provide the best regression predictions. Choosing the best prediction equations is not easy and various methods have been proposed (e.g. Subset Selection in Regression, A J Miller, Model Selection, H Linhart & W Zucchini). The functions demonstrated here investigate all possible subsets of the independent variable up to a given size. From these subset equations the best equations, of which there may be several, are selected. An initial investigation can be used to determine which columns of A are important for further analysis.

引用格式

Bill Whiten (2024). Equation selection using subset regression: regsubsets (https://www.mathworks.com/matlabcentral/fileexchange/64570-equation-selection-using-subset-regression-regsubsets), MATLAB Central File Exchange. 检索时间: .

MATLAB 版本兼容性
创建方式 R2017b
兼容任何版本
平台兼容性
Windows macOS Linux
类别
Help CenterMATLAB Answers 中查找有关 Linear Regression 的更多信息
致谢

参考作品: Optional function arguments

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!
版本 已发布 发行说明
1.0.0.0