Skip to main content

Tools for recommendation systems development

Project description

ml-recsys-tools

Open source repo for various tools for recommender systems development work. Work in progress.

Main purpose is to provide a single API for various recommender packages to train, tune, evaluate and get data in and recommendations / similarities out.

Recommender models and tools:

  • LightFM package based recommender.

  • Spotlight package based implicit recommender.

  • Implicit package based ALS recommender.

  • Serving / Tuning / Evaluation features added for most recommenders:

    • Dataframes for all inputs and outputs
      • adding external features (for LightFM hybrid mode)
      • early stopping fit (for iterative models: LightFM, ALS, Spotlight)
      • hyperparameter search
      • fast batched methods for:
        • user recommendation sampling
        • similar items samplilng with different similarity measures
        • similar users sampling
        • evaluation by sampling and ranking
  • Additional recommender models:

    • Similarity based:
      • cooccurence (items, users)
      • generic similarity based (can be used with external features)
  • Ensembles:

    • subdivision based (multiple recommenders each on subset of data - e.g. geographical region):
      • geo based: simple grid, equidense grid, geo clustering
      • LightFM and cooccurrence based
    • combination based - combining recommendations from multiple recommenders
    • similarity combination based - similarity based recommender on similarities from multiple recommenders
    • cascade ensemble
  • Interaction dataframe and sparse matrix handlers / builders:

    • sampling, data splitting,
    • external features matrix creation (additional item features), with feature engineering: binning / one*hot encoding (via pandas_sklearn)
    • evaluation and ranking helpers
    • handlers for observations coupled with external features and features with geo coordinates
    • mappers for geo features, observations, recommendations, similarities etc.
  • Evaluation utils:

    • score reports on lightfm metrics (AUC, precision, recall, reciprocal)
    • n-DCG, and n-MRR metrics, n-precision / recall
    • references: best possible ranking and chance ranking
  • Utilities:

    • hyperparameter tuning utils (by skopt)
    • similarity calculation helpers (similarities, dot, top N, top N on sparse)
    • parallelism utils
    • sklearn transformer extenstions (for feature engineering)
    • google maps util for displaying geographical data
    • logging, debug printouts decorators and other isntrumentation and inspection tools
    • pandas utils
    • data helpers: redis, s3
  • Examples:

    • a basic example on movielens 1M demonstrating:
      • basic data ingestion without any item/user features
      • LightFM recommender: fit, evaluation, early stopping, hyper-param search, recommendations, similarities
      • Cooccurrence recommender
      • Two combination ensembles (Ranks and Simils)
  • Still to add:

    • add example in README.MD
    • add and reorganize examples
    • much more comments and docstrings
    • more tests

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

ml_recsys_tools-0.5.2.2.tar.gz (57.9 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

ml_recsys_tools-0.5.2.2-py3-none-any.whl (74.9 kB view details)

Uploaded Python 3

File details

Details for the file ml_recsys_tools-0.5.2.2.tar.gz.

File metadata

File hashes

Hashes for ml_recsys_tools-0.5.2.2.tar.gz
Algorithm Hash digest
SHA256 c18d8d417b354d9a3e870a29aae6097aae91ab665e53145f0a550178eca4bad2
MD5 c1e1ee0f984bfab78c7ec6cb9c1c82fb
BLAKE2b-256 28d17b25aa0af6b83b5f728f49b593f05b5ad7f066ed927d3595cca776bcfcfb

See more details on using hashes here.

File details

Details for the file ml_recsys_tools-0.5.2.2-py3-none-any.whl.

File metadata

File hashes

Hashes for ml_recsys_tools-0.5.2.2-py3-none-any.whl
Algorithm Hash digest
SHA256 799df00cf086030a443685bb3f33db0a6877be739fd56bb7bbe08dbcb21722eb
MD5 2103d7e72e8637c39be2bfb7ef5bdf05
BLAKE2b-256 0069e081226ef608a3000745996412f481e72feab8e1f27fd81a48b03897b7c9

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page