在NG的ML課程中和西瓜書中都有提到:最佳的數據分類情況是把數據集分為三部分,分別為:訓練集(train set),驗證集(validation set)和測試集(test set)。那么,驗證集和測試集有什么區別呢?
訓練集,驗證集,測試集這三個名詞在機器學習領域的文章中很常見,以下是這三個詞的英文解釋。
Training set: A set of examples used for learning, which is to fit the parameters [i.e., weights] of the classifier.
Validation set: A set of examples used to tune the parameters [i.e., architecture, not weights] of a classifier, for example to choose the number of hidden units in a neural network.
Test set: A set of examples used only to assess the performance [generalization] of a fully specified classifier.
訓練集:學習樣本數據集,通過匹配一些參數來建立一個分類器。建立一種分類的方式,主要是用來訓練模型的。
驗證集:對學習出來的模型,微調分類器的參數,如在神經網絡中選擇隱藏單元數。驗證集還用來確定網絡結構或者控制模型復雜程度的參數。
測試集:主要用於測試訓練好的模型的分類能力(識別率等)
顯然,training set是用來訓練模型或確定模型參數的,如ANN中權值等; validation set是用來做模型選擇(model selection),即做模型的最終優化及確定的,如ANN的結構;而 test set則純粹是為了測試已經訓練好的模型的推廣能力。
但實際應用中,一般只將數據集分成兩類,即training set 和test set,大多數文章並不涉及validation set。