Git Product home page Git Product logo

covid-ssnmf's Introduction

Interpretable COVID prediction with Semi-Supervised NMF

About this repository

This repository contains scripts used to learn interpretable features from X-Ray imaging data originating from various sources related to the COVID-19 pandemic.


Files Contained

  • Extract_COVIDnet_Features.py - Utilizes the pretrained COVID-Net models and extracts the learned representations of the data at the final 3 layers of COVID-Net. The header of this script contains information on how to run it. Found in the "covidnet_representations" directory.
  • kmeans_DenseNet_Representations.m - Performs k-means clustering on the learned representation of the data for DenseNet [Add Reference], and computes the average purity of clusters over each different initialization of k-means. Found in the "covidnet_representations" directory.
  • kmeans_COVIDnet_Representations.m - Performs k-means clustering on the learned representations of the data for COVID-Net and computes the average purity of clusters over each different initialization of k-means. Found in the "covidnet_representations" directory.
  • evaluateRepresentation.m - Applies spectral and k-means clustering to the learned representations of DenseNet and COVID-Net. Found in "representation_evaluations" directory.
  • mapCompClus2Class.m - Computes an optimal permutation of the computed clusters when the ground truth labels are known. Found in "representation_evaluations" directory.
  • ssnmf_variants.ipynb - Several different algorithms for performing SSNMF. Found in the "ssnmf_variants" directory.


Usage

To perform clustering on the learned representations of COVID-Net:

  1. Clone the repository at https://github.com/lindawangg/COVID-Net and follow their instructions on how to generate the relevant data set
  2. Run the Extract_COVIDnet_Features.py script by providing as arguments the path to the pretrained model/data
  3. Run the script make_COVIDx_labels.py to generate .mat files containing the numerical labels for each data point. This is needed when computing the average purity for k-means clustering.
  4. Run the Octave (MATLAB) script kmeans_COVIDnet_Representations.m after adjusting the load paths and variables as appropriate to the .mat files generated in step 2 and 3. Warning: The 4/15/2020 update of COVID-Net changed the number and type of classes being used in the classification task.

To perform clustering on the learned representations... *To be updated
To perform SSNMF on... *To be updated

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.