吴裕雄 python 机器学习——数据预处理过滤式特征选取VarianceThreshold模型
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()
吴裕雄 python 机器学习——数据预处理过滤式特征选取VarianceThreshold模型的更多相关文章
- 吴裕雄 python 机器学习——数据预处理过滤式特征选取SelectPercentile模型
from sklearn.feature_selection import SelectPercentile,f_classif #数据预处理过滤式特征选取SelectPercentile模型 def ...
- 吴裕雄 python 机器学习——数据预处理包裹式特征选取模型
from sklearn.svm import LinearSVC from sklearn.datasets import load_iris from sklearn.feature_select ...
- 吴裕雄 python 机器学习——数据预处理正则化Normalizer模型
from sklearn.preprocessing import Normalizer #数据预处理正则化Normalizer模型 def test_Normalizer(): X=[[1,2,3, ...
- 吴裕雄 python 机器学习——数据预处理标准化MaxAbsScaler模型
from sklearn.preprocessing import MaxAbsScaler #数据预处理标准化MaxAbsScaler模型 def test_MaxAbsScaler(): X=[[ ...
- 吴裕雄 python 机器学习——数据预处理标准化StandardScaler模型
from sklearn.preprocessing import StandardScaler #数据预处理标准化StandardScaler模型 def test_StandardScaler() ...
- 吴裕雄 python 机器学习——数据预处理标准化MinMaxScaler模型
from sklearn.preprocessing import MinMaxScaler #数据预处理标准化MinMaxScaler模型 def test_MinMaxScaler(): X=[[ ...
- 吴裕雄 python 机器学习——数据预处理二元化OneHotEncoder模型
from sklearn.preprocessing import OneHotEncoder #数据预处理二元化OneHotEncoder模型 def test_OneHotEncoder(): X ...
- 吴裕雄 python 机器学习——数据预处理二元化Binarizer模型
from sklearn.preprocessing import Binarizer #数据预处理二元化Binarizer模型 def test_Binarizer(): X=[[1,2,3,4,5 ...
- 吴裕雄 python 机器学习——数据预处理字典学习模型
from sklearn.decomposition import DictionaryLearning #数据预处理字典学习DictionaryLearning模型 def test_Diction ...
随机推荐
- Pytest学习9-常用插件
pytest-django:为django应用程序编写测试. pytest-twisted:为twisted应用程序编写测试,启动反应堆并处理测试函数的延迟. pytest-cov:覆盖率报告,与分布 ...
- Ubuntu系统Apache2部署SSL证书
参考链接: https://help.aliyun.com/document_detail/102450.html?spm=a2c4g.11186623.6.582.17b74c07mBaXWS
- centos 部署 aspnetMVC 网页
在Linux上运行ASP.NET网站或WebApi的传统步骤是,先安装libgdiplus,再安装mono,然后安装Jexus.在这个过程中,虽然安装Jexus是挺简便的一件事,但是安装mono就相对 ...
- Linux系统搭建Java环境【JDK、Tomcat、MySQL】一篇就够
前言:所有项目在完成开发后都会部署上线的,一般都是用Linux系统作为服务器的,很少使用Windows Server(大多数项目的开发都是在Windows桌面系统完成的),一般有专门负责上线的人员 ...
- VJ数论专题AC代码临时保存
//A #include<bits/stdc++.h> using namespace std; bool vis[1000010]; void Get_Prime() { int n = ...
- CSS伪类before,after制作左右横线中间文字效果
<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8&quo ...
- JUC-JUC是什么?
一.JUC是什么? java.util.concurrent在并发编程中使用的工具类 进程/线程回顾 1.进程/线程是什么? 进程:进程是一个具有一定独立功能的程序关于某个数据集合的一次运行活动.它是 ...
- Oracle体系结构中基本概念,数据库
在Oracle体系结构中包含了基本概念即Oracle数据库与实例,如果你想要了解Oracle体系结构的话,你就必须要了解这两个基本的概念,以下是文章的具体介绍,望你浏览完以下的内容会有所收获. 数据库 ...
- 在SQL2005中修改数据库名称
SQL Server 2005中有个数据库HT_WisdomDataBaseCenter,现在要将其改名为HT_NBSBOneNetcs1步骤:(1) 分离数据库:打开management studi ...
- C分支语句的工程用法
if语言中零值比较的注意点: -bool型变量应该直接出现于条件中,不要进行比较 -变量和零值比较时,零值应该出现在比较符号左边 -float型变量不能直接进行零值比较,需要定义精度 bool b = ...