Skip to main content

PipRec - Recommender system for Python libraries

PipRec is a robust recommender system targeted for users starting on new projects. Often people want to install a number of libraries when they start working on a project. With so many libraries to choose from (over 200 thousand from PyPI alone) it is often difficult to make an informed decision. Our recommender system is aimed at solving this problem.

Background

We use data provided by libraries.io (https://libraries.io/data) to compute our recommendations. From the data we compute association rules which are then used as a basis for our recommendations.

The number of association rules is relatively small. Around 8500 libraries have recommendations based on these rules. Compared to the amount of libraries out there we employ another method to increase our range of recommendations.

For libraries which we do not have information for, we try to find a similar library for which we already have recommendations. This is based purely on library descriptions.

Features

  • Each recommendation has a quality indicator
  • Ability to choose between 2 quality metrics (Lift and Certainty Factor)
  • Ability to choose between 2 output formats (list-like and tree-like)
  • Ability to choose between 2 similarity methods for unseen libraries (Latent Dirichlet Allocation and PyPI search engine)

Getting started

To get a recommendation for a library simply type:

piprec <library_name>

To show the list of available flags type:

piprec -h

Quality metrics

By default, PipRec uses Lift to indicate the quality of a recommendation.

To switch to a Certainty Factor metric simply add the -cf flag to your command:

piprec <library_name> -cf

Output formats

By default, PipRec outputs the recommendations in a simple list-like format.

To enable the tree-like output add the flag -t to your command:

piprec <library_name> -t

Similarity methods

By default, PipRec uses a trained LDA (Latent Dirichlet Allocation) model to find a similar library for which we have data about. We assume that we have a large enough dataset that the most similar library found will have relevant recommendations for your library.

Alternatively, you can use PyPI to find a similar library. The way this works is that we query search function on the PyPI website and take the top result which we know of. To enable this add the flag -pse to your command:

piprec <library_name> -pse

Evaluation

We would be very pleased if you spent a little bit of your time to tell us how well we did. We do not collect any personal information and your feedback would help us in our future endeavours. Just click the link below to complete a survey.

https://docs.google.com/forms/d/1BzGa8oBFSSmS9NctdtDVNFhOiDJO-S5sRXm6NNm0oWc

Metadata

Release files for piprec 1.0.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for piprec 1.0.0
File Size Uploaded
piprec-1.0.0.tar.gz 7.9 MB Details

Built distribution (wheel)

Table of built distributions (wheels) for piprec 1.0.0
File Interpreter ABI Platform
piprec-1.0.0-py3-none-any.whl Python 3 none any Details

Total release size: 15.9 MB

Release files / piprec-1.0.0.tar.gz

Download URL piprec-1.0.0.tar.gz
Size 7.9 MB
Tags Source
SHA-256 checksum
How to use checksums
5620fd3f8d4796b1570086e32ff96351e229b95a4678b490a3a5b85be92aa8b4
BLAKE2b-256 checksum
How to use checksums
4ac0efaa3c7cf38473a4548718fd0c74bbc69554ed877fead728080ad77df77a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.1.1 pkginfo/1.5.0.1 requests/2.22.0 setuptools/42.0.2 requests-toolbelt/0.9.1 tqdm/4.36.1 CPython/3.7.4

Release files / piprec-1.0.0-py3-none-any.whl

Download URL piprec-1.0.0-py3-none-any.whl
Size 8.0 MB
Tags Python 3
SHA-256 checksum
How to use checksums
b8f460d2e28cb7db1d944630cb134471ca8f39a8e3d37e9b4303d920e2664544
BLAKE2b-256 checksum
How to use checksums
5d32d33ed56712840beac344c770ece3a07d98e92544cf77c1c22527749d0f12
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.1.1 pkginfo/1.5.0.1 requests/2.22.0 setuptools/42.0.2 requests-toolbelt/0.9.1 tqdm/4.36.1 CPython/3.7.4

Release history Release notifications | RSS feed

This release

1.0.0 This release

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page