#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. I.MX6 Kernel BUG at include/linux/netdevice.h:520!

    /*************************************************************************** * I.MX6 Kernel BUG at i ...

  2. learn go passing variable-length arguments

    package main // 参考文档: // https://github.com/Unknwon/the-way-to-go_ZH_CN/blob/master/eBook/06.3.md im ...

  3. XMPP协议相关知识

    XMPP协议的组成 主要的XMPP 协议范本及当今应用很广的XMPP 扩展: RFC 3920 XMPP:核心.定义了XMPP 协议框架下应用的网络架构,引入了XML Stream(XML 流)与XM ...

  4. JNative用法注意事项

    公司要做个跟设备打交道的web系统,需要java调用dll.搞java的同事说JNative看起来挺好使的,找俺帮忙调通.用的是1.3.1版本 环境设置. JNative的调试信息需要打开才能更清楚些 ...

  5. flash 一直在最上方,z-index无效

    设置embed的透明度 wmode="transparent" <embed src="http://player.youku.com/player.php/sid ...

  6. 【mongodb】Mongodb初识

    MongoDB 是一个基于分布式文件存储的数据库.由 C++ 语言编写.旨在为 WEB 应用提供可扩展的高性能数据存储解决方案. MongoDB 是一个介于关系数据库和非关系数据库之间的产品,是非关系 ...

  7. [MEF]第04篇 MEF的多部件导入(ImportMany)和目录服务

    一.演示概述此演示介绍了MEF如何使用ImportMany特性同时导入多个与相同约束相匹配的导出部件,并且介绍了目录服务(Catalog),该服务告知MEF框架可以在什么地方去搜寻与指定约束匹配的导出 ...

  8. 【转】Linux(BASH)命令搜索机制

    原文网址:http://www.mike.org.cn/articles/linux-linux-bash-command-search-mechanism/ 转自:Eric Cheung: Linu ...

  9. guaua学习,工具专题

    Preconditions 1,http://www.cnblogs.com/peida/p/Guava_Preconditions.html 1 .checkArgument(boolean) : ...

  10. 排序 第K大等问题总结

    在公司面试时,当场写排序比较多,虽然都是老掉牙的问题,还是要好好准备下 快速排序,以第一个元素为关键词比较,每次比较结束,关键词都会去到最终位置上 //7 3 2 9 8 3 4 6 //7 3 2 ...