Code Monkey home page Code Monkey logo

therapy-recommender-system's Introduction

Therapy Recommender System

An hybrid recommender system to predict the effectiveness of therapies in curing a medical condition of a patient. Check the report for more details on the implementation.

The system is based on a combination of different methods:

  • Latent Factorization Models (SVD/SVD++)
  • Collaborative Filtering (user-user/item-item)
  • Nearest Neighbors

Get started

Clone the repository and install the required dependencies:

git clone https://github.com/materight/therapy-recommender-system.git
cd therapy-recommender-system
pip install -r requirements.txt

Run recommender

To produce recommendations for a patient and a condition, run:

python main.py -d [dataset_path] -p [patient_id] -c [condition_id]

Alternatively, it is possible to specify a test csv file containing the patient and condition ids to predict:

python main.py -d [dataset_path] -t [test_path]

Additional options can be specified (run with --help to see the available ones).

Hyperparameter search

To evaluate multiple configurations for the recommender and perform an ablation study,run:

python benchmark.py -d [dataset_path]

The results will be saved in a csv file under the ./results folder.

The --val_split [fraction] option can be specified to customize the size of the validation split to use for evaluation.

Data generation

A synthetic dataset can be generated by simply running:

python data_generator.py --n-patients [num_generated_patients] -o [output_path]

The generation can be customized with additional options (use --help to see the available ones).

therapy-recommender-system's People

Contributors

materight avatar

Stargazers

 avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.