LinkAlike aims to build recommender systems using graph link prediction. As many have written about, the problem of product recommendation may be described as the prediction of a future edge in a user-item graph. This graph may be bipartite (i.e. only edges from users to items exist) or we may define edges between users or between items, providing a flavour of content-based recommendation.
This is still a work in progress.
- General:
- Create a benchmark dataset.
- Create a fast implementation of the pairwise dissimilarity in a set of arrays with categorical data.
- Graph class:
- Create method to create nodes out of
df
,df_user
anddf_item
. - Create method to create interaction (user-item) edges.
- Discretize numerical metadata if metadata datasets (
df_user
anddf_item
) are given. - Create similarity edges if metadata datasets (
df_user
anddf_item
) are given. - Create the
fit
method for node embeddings (use node2vec, but leave room for other methods). - Create the
transform
method for node embeddings, with strategy for unseen nodes.
- Create method to create nodes out of
- Recommendation:
- Create Recommender class, which receives node embeddings and predicts the existente of edges.
It is recommended to create a separated python environment to run linkalike
. If one chooses to install Miniconda (my personal favorite), an appropriate environment is created and open through the lines
conda create --name linkalike_env python=3.7
conda activate linkalike_env
Then, the packages can be pip-installed from Github,
python -m pip install git+https://github.com/gboaviagem/linkalike@main
or one may choose to simply install its dependencies:
git clone https://github.com/gboaviagem/linkalike
cd gspx
bash install.sh
When unit tests are implemented, one may run using pytest
:
python -m pytest --cov=linkalike .
To update the coverage badge, run
rm coverage.svg && coverage-badge -o coverage.svg
Update setup.py version and packages and generate package by running:
python setup.py sdist bdist_wheel
The pre-commit hook used to verify codestyle was copied from https://github.com/cbrueffer/pep8-git-hook.