sklearn.preprocessing中standardscaler和Normalizer之间的区别 [英] Difference between standardscaler and Normalizer in sklearn.preprocessing

查看:261
本文介绍了sklearn.preprocessing中standardscaler和Normalizer之间的区别的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

sklearn.preprocessing模块中standardscaler和normalizer有什么区别? 两者不都做同一件事吗?即使用偏差删除均值和量表?

What is the difference between standardscaler and normalizer in sklearn.preprocessing module? Don't both do the same thing? i.e remove mean and scale using deviation?

推荐答案

来自规范化工具文档:

具有至少一个非零分量的每个样本(即数据矩阵的每一行)都独立于其他样本进行重新缩放,以使其范数(l1或l2)等于1.

Each sample (i.e. each row of the data matrix) with at least one non zero component is rescaled independently of other samples so that its norm (l1 or l2) equals one.

StandardScaler

通过去除均值并缩放到单位方差来标准化特征

Standardize features by removing the mean and scaling to unit variance

换句话说,规范化器按行执行 ,而StandardScaler按列执行 .归一化器不会删除均值并按偏差进行缩放,而是将整行缩放为单位范数.

In other words Normalizer acts row-wise and StandardScaler column-wise. Normalizer does not remove the mean and scale by deviation but scales the whole row to unit norm.

这篇关于sklearn.preprocessing中standardscaler和Normalizer之间的区别的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆