Collaborative filtering that based on user behavior design is one of the most well-known, influential and widely used models in the recommendation world. Therefore, I share my code(ItemCF and UserCF) for a simple start.
.
├── dataset
│ └── ml-1m
│ └── ratings.dat
├── sim_matrix
│ ├── i2i***.pkl
│ └── u2u***.pkl
├── ItemCF.py
├── ItemCF_main.py
├── UserCF.py
├── UserCF_main.py
├── __init__.py
├── evaluate.py
└── utils.py
Dataset: ml-1m dataset and utils.py
contains details for processing dataset.