LAR(最小角回归)
来源:互联网 发布:上海惠普软件电话 编辑:程序博客网 时间:2024/05/19 22:03
LAR(最小角回归)
chenlongzhen
Sunday, March 01, 2015
LAR过程
LAR图解
R的lar包使用longley
数据(具有高度共线性)
用最小角度算最小二乘解,确定变量过程
library(lars)
## Warning: package 'lars' was built under R version 3.1.2
## Loaded lars 1.2
head(longley)
## GNP.deflator GNP Unemployed Armed.Forces Population Year Employed## 1947 83.0 234.289 235.6 159.0 107.608 1947 60.323## 1948 88.5 259.426 232.5 145.6 108.632 1948 61.122## 1949 88.2 258.054 368.2 161.6 109.773 1949 60.171## 1950 89.5 284.599 335.1 165.0 110.929 1950 61.187## 1951 96.2 328.975 209.9 309.9 112.075 1951 63.221## 1952 98.1 346.999 193.2 359.4 113.270 1952 63.639
w <- as.matrix(longley)#col1为y,col2-7为xlaa <- lars(w[,2:7], w[,1])laa
## ## Call:## lars(x = w[, 2:7], y = w[, 1])## R-squared: 0.993 ## Sequence of LASSO moves:## GNP Year Armed.Forces Unemployed Employed Population Year Employed## Var 1 5 3 2 6 4 -5 -6## Step 1 2 3 4 5 6 7 8## Employed Year Employed Employed## Var 6 5 -6 6## Step 9 10 11 12
plot(laa)
summary(laa)
## LARS/LASSO## Call: lars(x = w[, 2:7], y = w[, 1])## Df Rss Cp## 0 1 1746.86 1210.0561## 1 2 1439.51 996.6871## 2 3 32.31 12.6400## 3 4 23.18 8.2425## 4 5 22.91 10.0505## 5 6 22.63 11.8595## 6 7 18.04 10.6409## 7 6 14.74 6.3262## 8 5 13.54 3.4848## 9 6 13.27 5.2974## 10 7 13.01 7.1189## 11 6 12.93 5.0624## 12 7 12.84 7.0000
Cp
衡量多重共线性严重程度越小越好
0 0
- LAR(最小角回归)
- 最小角回归(Least Angle Regression)
- 最小角回归(Least Angle Regression)
- 最小角回归笔记
- 6.最小角回归(Least Angle Regression)
- 分组最小角回归算法(group LARS)
- 机器学习方法:回归(三):最小角回归Least Angle Regression(LARS),forward stagewise selection
- 机器学习方法:回归(三):最小角回归Least Angle Regression(LARS),forward stagewise selection
- 机器学习方法:回归(三):最小角回归Least Angle Regression(LARS),forward stagewise selection
- Ridge回归、Lasso回归、坐标下降法、最小角回归
- LARS 最小角回归算法程序代码使用归类使用
- 最小角回归(least angle regression) 的一点记录
- 坐标轴下降法与最小角回归法
- Lasso 稀疏约束 + Group Lasso 分组最小角回归算法
- Lasso回归算法: 坐标轴下降法与最小角回归法小结
- Lasso回归算法: 坐标轴下降法与最小角回归法小结
- 岭回归,Lasso和LAR学习(一)
- 岭回归、LASSO与LAR的几何意义
- 黑马程序员——Java之编程基础(二)
- foj 2173 nostop
- Linux下消息队列和socket绝对速度比拼[转]
- 浅谈C/C++的浮点数在内存中的存储方式
- SRS微信号和QQ群
- LAR(最小角回归)
- gradle构建+proguard加密
- Java设计模式-21-单一职责原则
- 相对路径、绝对路径、部署路径(html/css/servlet/jsp)
- 当你在浏览器中输入Google.com并且按下回车之后发生了什么?
- CodeForces 520C DNA Alignment
- xhprof安装&&使用
- TOM猫的简单实现
- 初学Nodejs:nodejs在web应用中充当着什么样的角色?