GithubHelp home page GithubHelp logo

mgt's Introduction

License: MIT

MGT (MaxSAT-based framework for Group Testing)

MGT is a novel MaxSAT-based framework for solving the decoding phase of Group testing. This tool is based on our AAAI-20 paper.

Installation

The scripts are compatible with Python 3 or higher. The tool uses MaxHS as the underlying MaxSAT solver (checkout version c8df41ac63e27c2cb32905302e6ede3118b7a07b). MaxHS requires CPLEX to process the arithmetic computation of the MaxSAT problem. To setup the Python API of CPLEX, please follow the instruction from here.

Scripts Description

mgt_benchmarks.py contains the subroutine main_varying_maxhs to generate and solve a group testing instance given the number of items n, probability of defective items p, type of tests (noiseless or noisy), and probability of noisy tests (in case of noisy test). This subroutine calls a set of supporting subroutines from group_testing_function.py, max_sat_interface.py, and exp_script.py. More specifically, group_testing_function.py contains useful scripts to generate the random item vector, the pool matrix, and to compute results after recovering the items. max_sat_interface.py acts as an interface to call a MaxSAT solver to solve the group testing instance. This script can be modified to use any off-the-shelf MaxSAT solver for solving the same problem. exp_script.py contains subroutines to show the experimental results as plots.

To compare MaxSAT-based framework with LP-relaxed (linear programming relaxation) approach, one would call the subroutine main_comparison_maxhs_lp from mgt_lp_comparison.py script. Moreover, general_lp_interface.py acts as an interface for calling a LP solver (the default choice is CPLEX) to solve the group testing instance.

Additionally, setup.py contains different choices including the directory of temporary files and generated plots.

Usage

To solve a noiseless group testing instance using MaxSAT, run the following commands.

import mgt_benchmark as mgt
import exp_script as plot
mgt.main_varying_maxhs(n=100, p=0.03, noiseless=True, verbose=True)
plot.parser(verbose=True)

The above commands solve a noiseless group testing instance for 100 items with 3% defective items.

To solve a noisy group testing instance with probability of noise as 5%, run the following command.

mgt.main_varying_maxhs(n=100, p=0.03, noiseless=False, noise_probability=0.05, verbose=True)

To compare the performance between the MaxSAT formulation and the LP formulation, run the following commands.

import mgt_lp_comparison as mgt_lp
import exp_script as plot
mgt_lp.main_comparison_maxhs_lp(n=100, p=0.03, noiseless=True, verbose=True)
plot.parser_comparison()

Similarly, to compare performance in the noisy group testing, run the following command.

mgt_lp.main_comparison_maxhs_lp(n=100, p=0.03, noiseless=False, noise_probability=0.05, verbose=True)

Run python test.py, that combines all above commands.

Issues, questions, bugs, etc.

Please click on "issues" at the top and create a new issue. All issues are responded to promptly.

Contact

Bishwamittra Ghosh ([email protected])

How to cite

@inproceedings{CGSM20,
author={Ciampiconi, Lorenzo and Ghosh, Bishwamittra and Scarlett, Jonathan and Meel, Kuldeep S.},
title={A {MaxSAT}-based Framework for Group Testing},
booktitle={Proceedings of AAAI},
year={2020},}

mgt's People

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.