데이터 분석/pandas
Item based collaborative filtering 하기 위해 pivot_table,corr 함수 min_periods 파라미터
iminu
2022. 5. 12. 17:45
데이터를 import 후 pivot_table함수로 collaborative filtering format으로 변경한다.
최소 80개이상 데이터가 있는 것만 상관계수를 뽑기 위해서 min_periods 파라미터에 80을 대입한다.

myRatings를 통해 추천을 받으려고한다. Movie Name column에서 nan값을 dropna하고 내림차순 정렬후 데이터프레임으로 만든 뒤 별점을 곱해서 weight column을 만든다. similar_movies_list에 정리하면 다음과 같다.