這篇文章是學習時整理的一些筆記,讓自己複習時方便!

Dataset差異

  1. Train: 用於擬合模型的數據樣本,提供模型進行訓練。
  2. Validation: 進行超參數的驗證,用於在調整模型超參數時對模型擬合在訓練數據集上的無偏評估的數據樣本。
  3. Test: 測試選擇的模型的準確度,用於提供對訓練數據集擬合的最終模型的無偏評估的數據樣本。
1
2
3
4
5
6
7
8
9
10
11
12
13
#split data
data = ...
train, validation, test = split(data)

#tune model hyperparameters
parameters = ...
for params in parameters:
model = fit(train, params)
skill = evaluate(model, validation)

#evaluate final model for comparison with other models
model = fit(train)
skill = evaluate(model, test)

閱讀清單

  1. What is the Difference Between Test and Validation Datasets?
  2. CNN筆記 - 超參數 (Hyperparamters)