This repo contains the code for a Kiva Loan Recommender based on user loan history.
- Kiva Loans - Feature Selection.ipynb: Initial analyses to find features that appeared to be more similar in loans given by a single user (ie. features that users showed a preference for).
- Kiva Loans - Find Similar Loans.ipynb: Calculations of two types of similarity score for comparison.
- find_similar_loans.py: Given a username as input, outputs loan details of the most similar loans for this user.
- update_loan_database.py: Periodically update the database with new loans and remove expired loans. This is run as a cronjob once daily. Calling it a "database" is a bit of a misnomer since it's stored as a pickled dictionary (data/loan_elements.pickle).
- recommender/: Flask app that runs the website www.kivaloans4.me, using the environment detailed in environment.yml.