吴裕雄 python 机器学习——数据预处理过滤式特征选取VarianceThreshold模型
2024-10-08 10:14:35
from sklearn.feature_selection import VarianceThreshold #数据预处理过滤式特征选取VarianceThreshold模型
def test_VarianceThreshold():
X=[[100,1,2,3],
[100,4,5,6],
[100,7,8,9],
[101,11,12,13]]
selector=VarianceThreshold(1)
selector.fit(X)
print("Variances is %s"%selector.variances_)
print("After transform is %s"%selector.transform(X))
print("The surport is %s"%selector.get_support(True))
print("After reverse transform is %s"%selector.inverse_transform(selector.transform(X))) #调用test_VarianceThreshold()
test_VarianceThreshold()
最新文章
- 2000条你应知的WPF小姿势 基础篇<;8-14>;
- WCF之安全性
- PP常用bapi
- [PE结构分析] 6.IMAGE_SECTION_HEADER
- UVa 442 矩阵链乘(栈)
- ajax跨域请求,页面和java服务端的写法
- matlab怎么同时显示imshow 两幅图片
- Delphi调用C++写的dll示例
- android脚步---如何看log之程序停止运行,和UI线程和非UI线程之间切换
- java 分页导出百万级数据到excel
- Asynchronous MQTT client library for C (MQTT异步客户端C语言库-paho)
- iOS 获取当前应用的信息以及用户信息:版本号手机号手机型号
- 关于ES6 用箭头函数后的 this 指向问题
- scala语言中的case关键字在spark中的一个奇特使用
- 如何提高JavaScript代码质量
- poj2387 最短路
- iOS_2_button控制物体形变
- Linux mii-tool 命令
- Xcode 工程文件“.xcodeproj”文件夹解析
- TRF7970A 天线
热门文章
- .gitignore文件说明-git提交时可忽略的文件
- vue报错 [Vue warn]: Avoid mutating a prop directly since the value will be overwritten whenever the parent component re-renders. Instead, use a data or computed property based on the prop&#39;s
- js中的window.location.search的用法与作用。
- Django 初试水(二)
- sql 应用记录
- java 多线程实现四种方式解析Thread,Runnable,Callable,ServiceExcutor,Synchronized ,ReentrantLock
- js -- 高阶函数的使用
- JQ 获取浏览器窗口宽高
- eclipse出错
- layui之表单验证