#data
library(lars)
data(diabetes)
attach(diabetes)

#glmnet
library(glmnet)
library(foreach)
library(Matrix)
gt <- cv.glmnet(x, y, nfolds = 10)
# plot(gt)
gt.coef <- coef(gt$glmnet.fit, s = gt$lambda.1se)
gt.coef
gt.coef[which(gt.coef != 0)]
rownames(gt.coef)[which(gt.coef != 0)]

何用glmnet或lars包进行feature selection的更多相关文章

  1. 机器学习-特征选择 Feature Selection 研究报告

    原文:http://www.cnblogs.com/xbinworld/archive/2012/11/27/2791504.html 机器学习-特征选择 Feature Selection 研究报告 ...

  2. 【转】[特征选择] An Introduction to Feature Selection 翻译

    中文原文链接:http://www.cnblogs.com/AHappyCat/p/5318042.html 英文原文链接: An Introduction to Feature Selection ...

  3. [Feature] Feature selection

    Ref: 1.13. Feature selection Ref: 1.13. 特征选择(Feature selection) 大纲列表 3.1 Filter 3.1.1 方差选择法 3.1.2 相关 ...

  4. [Feature] Feature selection - Embedded topic

    基于惩罚项的特征选择法 一.直接对特征筛选 Ref: 1.13.4. 使用SelectFromModel选择特征(Feature selection using SelectFromModel) 通过 ...

  5. 单因素特征选择--Univariate Feature Selection

    An example showing univariate feature selection. Noisy (non informative) features are added to the i ...

  6. 10-3[RF] feature selection

    main idea: 计算每一个feature的重要性,选取重要性前k的feature: 衡量一个feature重要的方式:如果一个feature重要,则在这个feature上加上noise,会对最后 ...

  7. Feature Selection Can Reduce Overfitting And RF Show Feature Importance

    一.特征选择可以减少过拟合代码实例 该实例来自机器学习实战第四章 #coding=utf-8 ''' We use KNN to show that feature selection maybe r ...

  8. highly variable gene | 高变异基因的选择 | feature selection | 特征选择

    在做单细胞的时候,有很多基因属于noise,就是变化没有规律,或者无显著变化的基因.在后续分析之前,我们需要把它们去掉. 以下是一种找出highly variable gene的方法: The fea ...

  9. the steps that may be taken to solve a feature selection problem:特征选择的步骤

    參考:JMLR的paper<an introduction to variable and feature selection> we summarize the steps that m ...

随机推荐

  1. sql基础语法复习

    约定:数据库名:test:表名:tb1,tb2,tb3…: 对象:数据库:database 表:table 列:column 索引:index 视图:view 存储过程:procedure 一.数据结 ...

  2. HDU 1452

    http://acm.hdu.edu.cn/showproblem.php?pid=1452 原来真心没见过这种题,不会做,非常帅 gcd(a,b)==1 && s(a,b)==s(a ...

  3. [javascript][转载]jQuery获取Select选择的Text和 Value

    原文地址: http://www.cnblogs.com/yaoshiyou/archive/2010/08/24/1806939.html http://www.cnblogs.com/SAL292 ...

  4. javascript中typeof用法

    JS中的变量是松散类型(即弱类型)的,可以用来保存任何类型的数据. typeof 可以用来检测给定变量的数据类型,可能的返回值: 1. 'undefined' --- 这个值未定义: 2. 'bool ...

  5. 20179223《Linux内核原理与分析》第十二周学习笔记

    Return-to-libc 攻击实验 一.实验描述 缓冲区溢出的常用攻击方法是用 shellcode 的地址来覆盖漏洞程序的返回地址,使得漏洞程序去执行存放在栈中 shellcode.为了阻止这种类 ...

  6. 《DSP using MATLAB》示例Example 8.15

  7. ubuntu qq安装

    安装最新版qq2016 qq2012下载链接: https://pan.baidu.com/s/1miFVc04 密码: 3g9w 先解压到自己所在的目录,解压命令自己百度在这个目录下,有三个解压包, ...

  8. Oracle基础查询

    select * from teacher--女性老师编号.姓名select tno,tname,gendar from teacher where gendar='女'--姓韩的女性老师编号.姓名. ...

  9. JavaScript:基本包装类型

    为了方便操作,JavaScript提供了3个特殊的引用类型:Boolean.Number和String.实际上,每当读取一个基本类型值的时候,后台就会创建一个对应的基本包装类型的对象,从而可以调用这些 ...

  10. java编程之POI读取excel表格的内容

    07版本的excel需要另外加一个jar包.xbean.jar的jar包 读取代码模板.利用模板介绍读取excel的一些poi的api这是重点 /** * 读取excel文件 * @Title: re ...