📜  最小-最大归一化的问题

📅  最后修改于: 2022-05-13 01:57:14.331000             🧑  作者: Mango

最小-最大归一化的问题

概述 :
使用的测量单位会影响数据分析。例如,将测量单位从公斤更改为磅。以较小的单位表示一个属性会导致该属性的范围更大,从而产生低效的结果。为了避免对测量单位选择的依赖,数据应该被标准化。归一化用于对属性数据进行缩放,使其落在较小的范围内,例如 -2.0 到 2.0。它通常用于分类算法。

使用规范化:
当我们处理具有不同尺度的属性时需要归一化,并且可能导致重要属性(具有较低尺度)的有效性较低,因为其他属性具有较大尺度的值。它还减少了机器学习数据所需的训练时间。因此,在对数据集进行归一化后,机器学习模型的效率会提高。

最小-最大归一化:
在这种知识归一化技术中,对第一个数据执行线性变换。从数据中获取最小值和最大值,并根据以下公式替换每个值。 Min-Max Normalization 保留原始数据值之间的关系。如果归一化的未来输入案例超出 A 的第一个数据范围,它将遇到越界错误。 公式如下:

{V' =} {V - min(A)}|{max(A) - min(A)}  {(new_max(A)-new_min(A))+new_min(A)}

其中A为属性数据表示如下。

Min(A)  - It is the minimum absolute value A.
Max(A)  - It is maximum absolute value of A.
v’      - It is the new value of each attribute data.
v       - It is the old value of each attribute data.

new_max(A), new_min(A) is the max and min value within the range
(i.e boundary value of range required) respectively.

Min-Max Normalization maps a value v of A to v'  in the range 
[new_min(A),new_max(A)] by computing.

例子 :
在这里,我们将讨论一个例子如下。
规范化以下数据组 -



1000,2000,3000,9000
using min-max normalization by setting min:0 and max:1

解决方案 -

here,new_max(A)=1 , as given in question- max=1
new_min(A)=0,as given in question- min=0
max(A)=9000,as the maximum data among 1000,2000,3000,9000 is 9000
min(A)=1000,as the minimum data among 1000,2000,3000,9000 is 1000

案例 1:标准化 1000 –

v  =  1000 , putting all values in the formula,we get
v' =  (1000-1000) X (1-0)
     -----------------    + 0  =0
      9000-1000

案例 2:标准化 2000 –

v   = 2000, putting all values in the formula,we get
v  '= (2000-1000) X (1-0) 
         -----------------         + 0 =0 .125 
           9000-1000

案例 3:归一化g 3000 –

v=3000, putting all values in the formula,we get
v'=(3000-1000) X (1-0)    
     -----------------         + 0 =0 .25       
       9000-1000

案例 4:标准化 9000 –

v=9000, putting all values in the formula, we get
v'=(9000-1000) X (1-0)   
  -----------------         + 0 =1
  9000-1000

结果 :
因此,1000、2000、3000、9000 的归一化值为 0、0.125、0.25、1。