Giter VIP home page Giter VIP logo

misa's Introduction

MISA: Multidataset Independent Subspace Analysis

This repository contains a MATLAB implementation for Multidataset Independent Subspace Analysis (MISA), using the Kotz distribution.

MDM

Usage

Step 1: Clone to MISA folder and start Matlab

cd ~
git clone [email protected]:rsilva8/MISA.git MISA
cd MISA
matlab

Optional: get example datasets (about 0.5GB)

cd ~
git clone [email protected]:rsilva8/MISA-data.git MISA-data
cd MISA-data
unzip MISA-data.zip
cd ../MISA

Step 2: Load data for analysis

% Add folders to path
addpath('./scripts')
addpath('./scripts/toy_example')

%% Load the true sources (Y) and true mixing matrices (A) to generate the mixtures

% Load sources
load(fullfile('.','scripts','toy_example','jointsourcesMISA_case6.mat'), 'Sgt')
Y = Sgt;

% Load Tetris-String features
load(fullfile('.','scripts','toy_example','A_TetrisString_orthofeat_r001.mat'),'A');

% Generate mixtures
X{1} = A{1}*Y{1};
X{2} = A{2}*Y{2};

Step 3: Define subspace structure

% Define the number of datasets (here, the number of modalities)
M = 1:length(X);

S = cell(1,2);           % Cell array: each cell contains a matrix K x C(m).
                         % Each k-th row has 0's and 1's to indicate what
                         % source go within the k-th subspace in dataset m

% Modality 1 = dataset 1
S{1} = [1 0 0 0;... % source 1 into subspace 1
        0 1 0 0;... % source 2 into subspace 2
        0 0 1 1;... % sources 3 and 4 into subspace 3
        0 0 0 0];   % no sources from modality 1 into subspace 4

% Modality 2 = dataset 2
S{2} = [1 0 0 0 0 0;... % source 1 into subspace 1
        0 1 1 0 0 0;... % sources 2 and 3 into subspace 2
        0 0 0 1 0 0;... % source 4 into subspace 3
        0 0 0 0 1 1];   % sources 5 and 6 into into subspace 4 

Step 4: Create MISA object

% Define MISA parameters

get_MISA_parameters

% Initialize MISA object

data1 = MISAKRE(w0, M, S, X, ...
                beta, eta, lambda, ...
                gradtype, sc, preX, ...
                REtype, REapproach, RElambda, ...
                REref, REreftype, REreflambda, rC);

Step 5: Run MISA

% Run MISA: PRE + LBFGS-B + Nonlinear Constraint + Combinatorial Optimization

execute_full_optimization

% NOTE: toggle lines 41-43 in @utils/getop.m to see detailed optimization iterations (considerably slower)

Step 6: Check results and visualize output

% Check results

fprintf("\nFinal MISI: %.4f\n\n", data1.MISI(A))
% typically, a number < 0.1 indicates successful recovery of the sources

Final MISI: 0.0303

%% Visualize recovered (mixing) patterns
view_results
  • Final MISA estimates

tetris_est string_est

This demonstrates that separation occurs up to subspace identification. Features retain their dependence within subspaces.

Citation

  • (2019) Rogers F. Silva, Sergey M. Plis, Tulay Adali, Marios S. Pattichis, Vince D. Calhoun. Multidataset Independent Subspace Analysis with Application to Multimodal Fusion. arXiv preprint

Dependences

  • Some examples assume SPM toolbox is readily available.
  • Some examples assume GIFT toolbox is also available.

Folders

@MISAK

  • This is the base MISA class. Use it to instantiate a MISA object which will contain the input data and the methods necessary for source estimation, including combinatorial optimization.

@MISAKRE

  • This class inherits from @MISAK. Use it to gain access to Reconstruction Error (RE) functionality.

@utils

  • This class implements various useful utility functions.

@gsd

  • A class for simulated data generation by simulating sources (Y) and mixing matrices (A). Also supports user-supplied mixing matrices (A).

@gsm

  • A class for simulated mixture generation. Supports user-supplied sources (Y) and mixing matrices (A).

scripts

  • Scripts for running fully simulated and hybrid examples.

other_methods

  • Alternate methods evaluated for comparison.

results

  • Some results for the examples include in the scripts folder.

Files

  • optprob4.mat: contains an optimization problem object for use with MATLAB's optimizaion toolbox.
  • validateFirstDerivatives_.m: slight modification of MATLAB's function to check the accuracy of user-defined derivatives wrt finite differencing.

Written For

  • MATLAB 2017a

License

All rights reserved. Free for academic use.

misa's People

Contributors

rsilva8 avatar

Stargazers

Alejandra López Castro avatar  avatar

Watchers

 avatar paper2code - bot 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.