지도 학습에서는 훈련 데이터로 학습한 모델이 훈련 데이터와 특성이 같다면 처음 보는 새로운
데이터가 주어져도 정확히 예측할 거라 기대합니다. 모델이 처음 보는 데이터에 대해 정확하게
예측할 수 있으면 이를 훈련 세트에서 테스트 세트로
일반화
generalization
되었다고 합니다. 그래서
모델을 만들 때는 가능한 한 정확하게 일반화되도록 해야 합니다.
보통 훈련 세트에 대해 정확히 예측하도록 모델을 구축합니다. 훈련 세트와 테스트 세트가 매
우 비슷하다면 그 모델이 테스트 세트에서도 정확히 예측하리라 기대할 수 있습니다. 그러나
항상 그런 것만은 아닙니다. 예를 들어 아주 복잡한 모델을 만든다면 훈련 세트에만 정확한 모
델이 되어버릴 수 있습니다.
가상의 예를 만들어 설명해보겠습니다. 초보 데이터 과학자가 요트를 구매한 고객과 구매 의사
가 없는 고객의 데이터를 이용해 누가 요트를 살지 예측하려 합니다.
2
그래서 관심없는 고객들
을 성가시게 하지 않고 실제 구매할 것 같은 고객에게만 홍보 메일을 보내는 것이 목표입니다.
고객 데이터는 [표
2
-
1
]과 같습니다.
표
2-1
고객 샘플 데이터
나이보유차량수주택보유자녀수혼인상태애완견보트구매
661yes2
사별
noyes
522yes3
기혼
noyes ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month, and much more.
O’Reilly covers everything we've got, with content to help us build a world-class technology community, upgrade the capabilities and competencies of our teams, and improve overall team performance as well as their engagement.
Julian F.
Head of Cybersecurity
I wanted to learn C and C++, but it didn't click for me until I picked up an O'Reilly book. When I went on the O’Reilly platform, I was astonished to find all the books there, plus live events and sandboxes so you could play around with the technology.
Addison B.
Field Engineer
I’ve been on the O’Reilly platform for more than eight years. I use a couple of learning platforms, but I'm on O'Reilly more than anybody else. When you're there, you start learning. I'm never disappointed.
Amir M.
Data Platform Tech Lead
I'm always learning. So when I got on to O'Reilly, I was like a kid in a candy store. There are playlists. There are answers. There's on-demand training. It's worth its weight in gold, in terms of what it allows me to do.