본문 바로가기

추천 시스템/Content-based Filtering

(4)
[CB Filtering] 4. Profile Learner(1) 지금까지는 CB Filtering의 전체적인 개요, Content Analyzer를 공부했다. 지금부터는 Profile Learner에 대해 공부할 것이다. Profile Learner에는 다음과 같은 종류가 있으며, 이번 포스팅에서는 Least Square만 설명할 것이다. 1. Least Square 2. Naive Bayes 3. Rocchio's Algorithm 위 그림은 유저들이 영화에 대해 점수를 매긴 것이다.(점수 뿐만 아니라 유저가 자신의 선호를 나타낸 것이라면 아무거나 상관없다.) feature 1 feature 2 feature 3 Love at last 1 0.9 0 Romance forever 1 1.0 0.01 Cute puppies of love 1 0.99 0 Nonstop ..
[CB Filtering] 3. TF-IDF Practice Amazon Fine Food Reviews라는 데이터셋을 활용해서 TF-IDF 실습을 했다. 구현은 직접 하지 않고 sklearn에서 제공하는 TfidfVectorizer 기능을 사용했다. feature의 수에 제한을 두지 않으면 메모리 부족으로 터지는 문제가 있어 max_features 파라미터 값으로 10,000을 줬다. 자연어 전처리를 한 결과를 TfidfVectorizer에 넣어줘야 하는 줄 알았는데 TfidfVectorizer에 파라미터로 이것저것 넣어주면 알아서 전처리를 해준다. Tfidf를 구하고 나서는 각 문서를 가장 잘 설명하는 단어를 5개씩 출력했다. In [11]: # This Python 3 environment comes with many helpful analytics libr..
[CB Filtering] 2. Keyword-based Vector Space Model 이전글 1. 2020/03/12 - [추천 시스템/Content-based Filtering] - [CB Filtering] 1. 개요 저번 포스팅에서 개요를 설명하며 봤던 그림이다. 오늘 내용은 빨간 박스를 친 부분이다. 대부분의 추천 시스템은 TF-IDF를 활용한 Vector Space Model을 정보 획득 모델로 사용한다. Vector Space Model(VSM)은 문서의 공간적 표현(spatial representation)이다. 간단한 예를 들어보면 다음과 같다. Document 1: The boxer rebellion Document 2: The boxer Document 3: The rebellion 전체 문서는 "rebellion", "the", "boxer"로 이루어져 있으며, 각각의..
[CB Filtering] 1. 개요 Content-based Filtering vs Collaborative Filtering Content-based Filtering - 유저가 과거에 좋아했던 것과 컨텐츠가 유사한 아이템 추천 Collaborative Filtering - Rating을 기반으로 유저와 비슷한 성향을 지닌 집단을 찾고, 그들이 좋아하는 상품 추천 CB 추천 시스템의 구조 핵심 부품 세 가지 Content Analyzer 컨텐츠를 분석 다음 부품인 Profile Learner, Filtering Component에서 사용할 수 있도록 unstructured data를 structured data로 변환하는 작업 수행 ex) unstructured data인 raw text를 structured data인 keyword v..