the difference between scaling and normalization
简单来说,就是scaling不改变数据分布的形状,只改变数据的范围。而normalization会将数据的分布改变,变得更加接近高斯分布。
scaling
This means that you’re transforming your data so that it fits within a specific scale, like 0-100 or 0-1. You want to scale data when you’re using methods based on measures of how far apart data points, like SVM or KNN. With these algorithms, a change of “1” in any numeric feature is given the same importance.
翻译:这意味着您正在转换数据,使其符合特定的比例,如0-100或0-1。当您使用基于数据点距离度量的方法(如支持向量机、SVM或k近邻或KNN)时,需要缩放数据。使用这些算法,任何数字特征中“1”的变化都具有相同的重要性。
For example, you might be looking at the prices of some products in both Yen and US Dollars. One US Dollar is worth about 100 Yen, but if you don’t scale your prices methods like SVM or KNN will consider a difference in price of 1 Yen as important as a difference of 1 US Dollar! This clearly doesn’t fit with our intuitions of the world. With currency, you can convert between currencies. But what about if you’re looking at something like height and weight? It’s not entirely clear how many pounds should equal one inch (or how many kilograms should equal one meter).
翻译:例如,您可能正在查看某些产品的日元和美元价格。一美元价值约100 Yen,但如果你不按比例定价,比如SVM或KNN,就会考虑1日元的差价,和1美元的差价一样重要。这显然不符合我们对世界的直觉。使用“货币”,您可以在不同货币之间进行转换。但是如果你看的是身高和体重呢?现在还不完全清楚多少磅应该等于一英寸(或者多少公斤应该等于一米)。
By scaling your variables, you can help compare different variables on equal footing.
翻译:通过缩放变量,您可以帮助在平等的基础上比较不同的变量。
举例如下:
normalization
Scaling just changes the range of your data. Normalization is a more radical transformation. The point of normalization is to change your observations so that they can be described as a normal distribution.
翻译:scaling只会更改数据的范围。normalization是一种更激进的转变。normalization的要点是改变你的观察值,使它们可以被描述为正态分布。
In general, you’ll only want to normalize your data if you’re going to be using a machine learning or statistics technique that assumes your data is normally distributed. Some examples of these include t-tests, ANOVAs, linear regression, linear discriminant analysis (LDA) and Gaussian naive Bayes. (Pro tip: any method with “Gaussian” in the name probably assumes normality.)
翻译:通常,如果要使用假设数据是正态分布的机器学习或统计技术,则只需要对数据进行规范化。其中的一些例子包括t检验、方差分析、线性回归、线性判别分析(LDA)和高斯朴素贝叶斯。(专业提示:名称中带有“Gaussian”的任何方法都可能假定为正态。)