Patrick's 데이터 세상
BOW(Bag of Words) 본문
반응형
SMALL
문서가 가지는 모든 단어(Words)를 문맥이나 순서를 무시하고 일괄적으로 단어에 비해 빈도 값을 부여해 피처 값을 추출하는 모델입니다.
Bag of Words는 문서 내 모든 단어를 한꺼번에 봉투 안에 넣은 뒤에 흔들어서 섞는다는 의미입니다.
문장 : 'I love this movie! It's sweet, but with satirical humor. The dialogue is great and the adventure scenes are fun... It manages to be whimsical and romantic while laughing at the conventions of the fairy tale genre. I would recommend it to just about anyone. I've seen it several times, and I'm always happy to see it again whenever I have a friend who hasn't seen it yet!'
Index 0 | Index 1 | Index 2 | Index 3 | Index 4 | Index 5 | Index 6 | Index 7 | ... | |
it | I | the | to | and | seen | yet | would | ... | |
문장 | 6 | 5 | 4 | 3 | 3 | 2 | 1 | 1 | ... |
위 문장에 있는 모든 단어에서 중복을 제거하고 각 단어(feature 또는 term)를 칼럼 형태로 나열합니다.
그러고 나서 각 단어에 고유의 인덱스를 부여하고 해당 단어가 나타나는 횟수를 각 단어에 기재합니다.
BOW 모델
장점 : 쉽고 빠른 구축
단점 : 문맥 의미(Semantic Context) 반영 부족
희소 행렬 문제(희소성)
반응형
LIST
'Deep Learning > 이론' 카테고리의 다른 글
Loss 함수 (0) | 2021.04.09 |
---|---|
정보 검색 개념 (0) | 2021.02.18 |
텍스트 분석(Text Analytics) (0) | 2020.12.14 |
PCA 분석 (0) | 2020.12.02 |
Word2vec (0) | 2020.11.29 |
Comments