美文网首页
Yeo-Johnson变换

Yeo-Johnson变换

作者: 山有木兮木有刺 | 来源:发表于2020-10-19 20:08 被阅读0次

1 为什么要进行Yeo-Johnson变换

To better meet the assumptions of normality and homogenous variances

Yeo-Johnson transformation provides a powerful way of reducing skewness and can be applied to variables that include negative values【1】

参考文献:【1】Global effects of soil and climate on leaf photosynthetic traits and rates 

备注:

help(preprocessing.scale)

scale(X, axis=0, with_mean=True, with_std=True, copy=True)

axis=0:默认是按照每一个特征(即按照列)进行标准化;

axis=1:则为行,按照样本进本进行标准化

代码:


import numpyas np

from sklearn.preprocessingimport PowerTransformer

pt =PowerTransformer(method='yeo-johnson', standardize=True, copy=True)

data = [[1, 2], [3, 2], [4, 5]]

print(pt.fit(data))

PowerTransformer()

print(pt.lambdas_)

print(pt.transform(data))

相关文章

  • Yeo-Johnson变换

    1 为什么要进行Yeo-Johnson变换 To better meet the assumptions of n...

  • Homography|单应性

    几何变换类型 保距变换 isometry 相似变换 similarity 仿射变换 affine 射影变换 pro...

  • 彩色电影

    在森林中 树叶变换色彩 昆虫变换翅膀 鸟变换羽毛 都像是 人在换衣裳 在河流中 鱼变换影子 水草变换舞步 河岸变换...

  • 数字图像处理-二

    变换域处理方法 一、主成分分析二、最小噪声分离三、缨帽变换线性变换 四、傅里叶变换五、小波变换频率域变换 六、颜色...

  • 变换

    以前总是焦躁的苦思冥想, 现在也学会了事前的徜徉, 方案虽是静思后才会成熟, 别将心事锁在孤寂里痛楚, 分享纠结也...

  • 变换

    炎热的天气还未走, 飘叶的季节来了, 桂花树还在, 鸟儿却不在枝头, 它觅食在海边。 秋天的韵味, 並不蕴蓄凉风的...

  • 变换

    有清风微微刮过 带着一股股热浪袭来 我不知道何时能够过去 你,一直停在我的心怀 忽然你狂暴了起来 清风不在 优雅的...

  • 【变换】

    当夜晚来临 白色变换成彩色 西瓜变换成橘子 甜味变换成酸味 有些透彻的疲惫 当世界热闹起来 四处有人在谈论世界杯 ...

  • 变换

    本网讯(通讯员任智琪 许唯佳)3月28日下午,武汉市东湖新技术开发区疾控中心刘丽、姜丹两位专家应邀在图书馆3号报告...

  • 变换

    冬天冻掉了红色的月亮 我把它捡起来放在心口上暖 第二天 它又挂在了天上

网友评论

      本文标题:Yeo-Johnson变换

      本文链接:https://www.haomeiwen.com/subject/yjslmktx.html