from sklearn.preprocessing import MaxAbsScaler

#数据预处理标准化MaxAbsScaler模型
def test_MaxAbsScaler():
X=[[1,5,1,2,10],
[2,6,3,2,7],
[3,7,5,6,4,],
[4,8,7,8,1]]
print("before transform:",X)
scaler=MaxAbsScaler()
scaler.fit(X)
print("scale_ is :",scaler.scale_)
print("max_abs_ is :",scaler.max_abs_)
print("after transform:",scaler.transform(X)) # 调用 test_MaxAbsScaler
test_MaxAbsScaler()

吴裕雄 python 机器学习——数据预处理标准化MaxAbsScaler模型的更多相关文章

  1. 吴裕雄 python 机器学习——数据预处理标准化StandardScaler模型

    from sklearn.preprocessing import StandardScaler #数据预处理标准化StandardScaler模型 def test_StandardScaler() ...

  2. 吴裕雄 python 机器学习——数据预处理标准化MinMaxScaler模型

    from sklearn.preprocessing import MinMaxScaler #数据预处理标准化MinMaxScaler模型 def test_MinMaxScaler(): X=[[ ...

  3. 吴裕雄 python 机器学习——数据预处理正则化Normalizer模型

    from sklearn.preprocessing import Normalizer #数据预处理正则化Normalizer模型 def test_Normalizer(): X=[[1,2,3, ...

  4. 吴裕雄 python 机器学习——数据预处理流水线Pipeline模型

    from sklearn.svm import LinearSVC from sklearn.pipeline import Pipeline from sklearn import neighbor ...

  5. 吴裕雄 python 机器学习——数据预处理字典学习模型

    from sklearn.decomposition import DictionaryLearning #数据预处理字典学习DictionaryLearning模型 def test_Diction ...

  6. 吴裕雄 python 机器学习——数据预处理过滤式特征选取SelectPercentile模型

    from sklearn.feature_selection import SelectPercentile,f_classif #数据预处理过滤式特征选取SelectPercentile模型 def ...

  7. 吴裕雄 python 机器学习——数据预处理过滤式特征选取VarianceThreshold模型

    from sklearn.feature_selection import VarianceThreshold #数据预处理过滤式特征选取VarianceThreshold模型 def test_Va ...

  8. 吴裕雄 python 机器学习——数据预处理二元化OneHotEncoder模型

    from sklearn.preprocessing import OneHotEncoder #数据预处理二元化OneHotEncoder模型 def test_OneHotEncoder(): X ...

  9. 吴裕雄 python 机器学习——数据预处理二元化Binarizer模型

    from sklearn.preprocessing import Binarizer #数据预处理二元化Binarizer模型 def test_Binarizer(): X=[[1,2,3,4,5 ...

随机推荐

  1. 《NVM-Express-1_4-2019.06.10-Ratified》学习笔记(5.21.1.10-加-6.4)Atomic_Operations

    5.21.1.10 Write Atomicity Normal 这个特性控制AWUN和NAWUN参数的操作.设置的属性值在set Feature命令的Dword 11中表明. 如果提交Get Fea ...

  2. 《NVM-Express-1_4-2019.06.10-Ratified》学习笔记(5.23)-- Format NVM command

    5.23 Format NVM command - NVM Command Set Specific Format NVM命令用于低级格式化NVM媒介.这个命令被host主机使用,来变更LBA数据大小 ...

  3. jacob导入项目

    在 resource 下创建一个 lib 将网上下载的 jacob.jar 放入其中 在 pom 文件中导入相对应的 jar 包 <dependency> <groupId>c ...

  4. vim编辑器-删除命令

    dd:删除游标所在的一整行(常用)   ndd:n为数字.删除光标所在的向下n行,例如20dd则是删除光标所在的向下20行   d1G:删除光标所在到第一行的所有数据   dG:删除光标所在到最后一行 ...

  5. 酷卓 一键ROOT教程

    待编辑,还没写完 哈哈 酷卓 一键ROOT教程 首先简单介绍下酷卓. 酷卓由我个人开发,主要为了用户获取ROOT简单化,傻瓜化.酷卓获取方式:加QQ群 766969447 群文件下载就行 1. 手动选 ...

  6. [CF1216C] White Sheet - 离散化,模拟

    虽然分类讨论应该是比较推崇的解法,但是我就是喜欢暴力 #include <bits/stdc++.h> using namespace std; #define int long long ...

  7. Harris角点检测理论

     这样想象一下,直线上的一个点在垂直于直线的方向上有最强的梯度.沿着直线的方向梯度较低,意思是直线上的像素点与它周围的像素点看起来相似.我们进行的角点检测是梯度强度明显高于其他像素的点,可能就是目标处 ...

  8. 用户注册(php)login(非美化)

    <!DOCTYPE html><html> <head> <meta charset="UTF-8"> <title>& ...

  9. Centos7 安装VNC实现远程桌面

    1.设置root用户方法: 1.# 复制一个服务设置的模板,命令如下: cp /lib/systemd/system/vncserver@.service /etc/systemd/system/vn ...

  10. oracle 处理锁表,创建新的数据库实例

    select saddr,sid,serial#,paddr,username,status from v$session where username is not null and usernam ...