주형 열을 인코딩하는 데 사용됩니다. 다양한 방식으로 값을 인코딩할 수 있지만 원핫 인코딩
을 사용합니다. 열을 정수로 인코딩한 다음,그다음 계층에서 원핫 인코딩이나 기타 가능한 변
환을 수행하는 방법도 있습니다.
마지막으로, 사이킷런에서 특징을 전처리할 때 특징 교차도 수행했습니다. 사이킷런에서는 각
특징의 값에 해당하는 문자열을 연결한 다음, 연결한 값을 원핫 인코딩하는 다소 수작업적인
과정이었죠. 케라스에는
HashedCrossing
이라고 하는 특징 교차를 처리하는 전처리 계층이 존
재합니다.
HashedCrossing
계층은 두 범주형 특징을 가져와서 교차 특징을 생성합니다.
더욱 다양한 전처리 계층은 텐서플로 공식 사이트의 ‘전처리 레이어 처리’ 가이드
5
를 참조하세
요.
8.3.2
모델을 위한데이터셋과 전처리 계층 만들기
이제 전처리 파이프라인을 케라스로 재구성하여 새로운 모델 구조를 탐색합니다.
구글 코랩에서 신규 노트북을 열고 이름을
keras
_
model
.
ipynb
로 지정합니다. 진행하며 막히
는 부분이 있다면,
chapter8
디렉터리
6
의
keras
_
model
.
ipynb
에 수록된 내용을 참조하기 바
랍니다.
먼저, 이전에 ...
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.