Skip to content

Codebase of the Fibro-QuanNet: Pulmonary Fibrosis Prognosis Prediction using Quantum Machine Learning

License

Notifications You must be signed in to change notification settings

nuvinga/fibro-quannet-app

Repository files navigation

Fibro-QuanNet - Codebase

Researched & Developed By: Nuvin Godakanda Arachchi

Fibro-QuanNet is a Pulmonary Fibrosis Prognosis Prediction application utilizing Quantum Machine Learning to accurately predict the likely prognosis of PF (Pulmonary Fibrosis).

This code was developed as partial completion of my BEng (Hons) Software Engineering degree program at the University of Westminster.

The full thesis paper can be found on ResearchGate.

More information into the project can be found on my Fibro-QuanNet repository.

General Overview

This application utilises a Quantum Varariational Circuit as a layer on a Classical Multiple Quantile Regression machine learning model, which has proven (through the thesis linked above) to increase model accuracy and robustness measured through Laplace-Loglikelihood evaluation matrix and MRSE and MSE scores.

The model utilises the OSIC Pulmonary Fibrosis Dataset for training and basic testing of the model performance.

Requirements

  • Data
  • Software
    • Windows/ Mac/ Linux Operating System
    • Python 3
    • NodeJS
  • Hardware
    • Intel Core i7 (10th Gen)/ Apple M1 Pro or higher
    • Quantum Hardware
      • IBM Quantum (Provided through IBM-Quantum Labs/ PennyLane)
      • Google Cirq (Provided through Cirq/ PennyLane

For a more comprehensive set of requirements, refer to Chapter 3 in the full paper, available through Fibro-QuanNet repository or DOI.

How to run Fibro-QuanNet

The application consists of three main components

  • quantum-notebook - The Jupyter Notebook file for the models development (Using JetBrains: DataSpell)
  • fibro-quannet-frontent - The JavaScript based React frontend application (Using Visual Studio Code)
  • flask-server - Python based Flask API gateway (Using Visual Studio Code)

How to work with and run each component will be explained below.

quantum-noteboot

The notebook acts as a simple Jupyter Notebook, run using JetBrains: DataSpell (Ultimate Edition) using anaconda3 and python3. In order to run the notebook and recreate the results, follow the following steps:

  1. Add the OSIC Pulmonary Fibrosis Dataset into the osic-pulmonary-fibrosis-progression folder
  2. Add the OSIC Cached Dataset (Latency Encoded) available through Kaggle into the osic-cached-dataset folder.

If you wish to train the model, you will need to run the notebook from the imports and generate the neccessary weight exports (output on to the working directory).

fibro-quannet-frontent

This is a React-JS application, thus the normal steps to run a react app using NPM would work here.

Install the node-modules initially, and npm run start to start the localhost server.

Make sure you have already started the Flask-Server before starting the React App

fibro-quannet-frontent

This is also a basic flask server application. The virual envioronment venv can be source activated and have the server.py hosted.

Codebase utilization disclaimer

This codebase has been submmitted to the Turn-it-in global referencing scheme in 2023. Thus, utilizing this code directly in any acedemic work can result in plagiarism.