特徵歸一化

題目(2):爲什麼需要對數值類型的特徵做歸一化 (normalization)?

回答角度:

  • 歸一化的方式
  • 歸一化的作用
  • 各方式的優劣

數據類型

  • 結構化數據:數值型、類別型(ordinal, nominal)
  • 非結構化數據:包含的信息無法用一個簡單的數值表示,並且每條數據的大小各不相同

歸一化方式

min-max scaling

Pro

  • may be useful where all parameters need to have the same positive scale

z-score normalization (aka standardization)

Con

  • sensitive to outliers

normalize vectors to a norm of one

歸一化原因

  • 梯度下降法更易找到最優解

應用場景

需normalization的問題

  • linear regression, logistic regression, kNN with Euclidean distance, SVM, linear discriminant analysis, neural network, PCA, K-means

不需normalization的問題

  • decision tree, e.g. C4.5: split nodes based on information gain, which is not affected by normalisation.
  • graphical-model based classifiers, e.g. Fisher LDA, Naive Bayes

備註:統計文獻中通常稱爲feature scaling. min-max的方式稱爲normalization, z-score normalization稱爲standardisation。


參考文獻
  1. 《百面機器學習》
發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章