This repo contains code to generate data and train an ML recommender using a Matrix Factorization library called implicit
-
we have identified that we can leverage the Alternating Least Squares (ALS) algorithm to build this recommender system as described in the paper Collaborative Filtering for Implicit Feedback Datasets.
-
We will generate our own dataset similar to the method used in Cevo Shopping Demo
-
Our dataset does not have any rating information (dataset does not have explicit feedback), so we will use the implicit feedback method to generate the recommendations.
-
There is a python library called implicit which implements this algorithm as defined in the paper. We will use this library instead of implementing the algorithm from scratch.
-
This model is online serving (meaning that the predictions are done in real time), and because we are hosting this model in a serverless in AWS Lambda, it may not be grunty enough for a larger dataset.
-
The MLOps pipeline, we're using Metaflow in this project, will take care of model building, hyperparameter tuning, model evaluation, then model serving. We will deploy the model in a Lambda function, and we will use the API Gateway to expose the model as an API endpoint.
- GitHub Actions
- Metaflow
- AWS S3
- Comet ML for experiment tracking
- SAM for Lambda deployment
- GridSearch CV (or manual grid search)
- Model Registry (?)
- Feature Store (?)
python recommender.py show
python recommender.py run