Welcome to the Python package for multi-task compressive sensing (MultiCS)! This packages provides various algorithms to solve multiple compressive sensing tasks in parallel. This codebase accompanies the paper An Efficient Algorithm for Clustered Multi-Task Compressive Sensing by Alexander Lin and Demba Ba.
The main entry point into the codebase is through the MultiTaskCompSens
object. You can instantiate it as follows:
from multics.model import MultiTaskCompSens
model = MultiTaskCompSens(mode="clustered", alg="em", num_clusters=2)
There are two main parameters for this object (see our paper for more details):
mode
: This determines the type of model to use. Options includeseparate
(i.e. not sharing any information between CS tasks),joint
(i.e. sharing information between all CS tasks), andclustered
(i.e. automatically learning and sharing information between clusters of tasks). If theclustered
option is used, you also need to specify an additional argumentnum_clusters
.alg
: This determines the type of algorithm to use. Options areem
(i.e. the original expectation-maximization algorithm) andcofem
(i.e. the acceelerated, covariance-free version of EM proposed in our paper). If usingcofem
, there are also additional required parameters:num_probes
andcg_tol
.
After instantiating the object, the model.fit
function can be used to run the inference algorithm and solve the CS tasks. For a full example of how to use this function, see the time.py
script file. You can also use this script to reproduce the results in our paper.