티스토리 뷰

머신러닝에서 Validation Set은 왜 필요한가? Train Set, Test Set 둘로만 나눠서 Test set 결과만 가지고 모델들을 비교하면 안되나?

Train Set, Test Set으로만 나눴을 때
Train Set, Validation Set, Test Set으로 나눴을 때

표현을 좀 바꿔보자. 첫번째 사진에서 Test Set을 Validation Set이라고 하고, 왜 Validation Set 결과만 가지고 모델들을 비교하면 안될까? 왜 Test Set이 필요할까? 일단 Validation Set은 모델을 학습시킬 때 직접적으로 사용되지 않지만, Validation Set에서 우수한 결과를 내기 위해 사람이 Validation Set 결과를 보고 계속 Hyperparameter Tuning을 한다. Validation Set에서 최우수한 결과를 내기 위해Hyperparameter들을 fitting한다고도 할 수 있다. 그렇기 때문에 미지의 데이터들이 들어왔을 때 Validation Set에서만큼 성능을 보인다고 확신할 수 없는게, 최종모델의 Hyperparmeter들이 Validation Set에서만 좋은 값들일 수도 있기 때문이다. 

때문에 우리는 아예 학습과정에서 직간접적으로 쓰이지 않은 Test Set을 가지고 모델비교를 해야 객관적인 비교가 된다. 

Test sets and validation sets "wear out" with repeated use. That is, the more you use the same data to make decisions about hyperparameter settings or other model improvements, the less confidence you'll have that these results actually generalize to new, unseen data. Note that validation sets typically wear out more slowly than test sets. If possible, it's a good idea to collect more data to "refresh" the test set and validation set. Starting anew is a great reset.

구글 머신러닝 교육플랫폼에서는 hyperparameter 튜닝을 하거나 모델개선을 할 때 같은 DataSet을 이용할때마다 그 Dataset이 "마모"된다고 표현했다. 해당 Dataset이 학습에 쓰이지 않아도 모델에 대한 Decision에 영향을 줄 때마다 해당 Dataset의 전체 미지의 Data들에 대한 대표성(Representative)이 떨어진다고 할 수 있는 것이다. 해당 Dataset의 대표성이 떨어지니 모델의 Generalized된 성능을 그 Dataset의 결과를 보고 판단할 수 없게 된다.
Biased Sample(Dataset)에 대한 설명
http://changingminds.org/disciplines/argument/fallacies/unrepresentative_sample.htm
https://www.statisticshowto.datasciencecentral.com/what-is-bias/

 

참고 링크:
https://datascience.stackexchange.com/questions/18339/why-use-both-validation-set-and-test-set 1,2번 답글https://developers.google.com/machine-learning/crash-course/validation/another-partition

'Research (연구 관련)' 카테고리의 다른 글

Binocular Disparity  (0) 2019.05.27
Ad hoc categories  (0) 2019.05.23
netD(fake.detach())의 이유  (7) 2019.05.11
Transposed Convolution  (0) 2019.05.10
nohup on other file  (0) 2019.04.29
공지사항
최근에 올라온 글
최근에 달린 댓글
Total
Today
Yesterday
링크
«   2024/05   »
1 2 3 4
5 6 7 8 9 10 11
12 13 14 15 16 17 18
19 20 21 22 23 24 25
26 27 28 29 30 31
글 보관함