GithubHelp home page GithubHelp logo

heoa / bass Goto Github PK

View Code? Open in Web Editor NEW

This project forked from judyboon/bass

0.0 3.0 0.0 13.44 MB

A Bayesian group factor model with structured sparsity

License: GNU General Public License v3.0

C++ 98.09% Makefile 0.68% R 0.48% Shell 0.75%

bass's Introduction

BASS

This repository contains the implementation of BASS, a group factor analysis model with Bayesian structured sparsity priors. For details of the model, please see http://arxiv.org/abs/1411.2698. The draft is published on Journal of Machine Learning Research (JMLR).

License

This software is distributed under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.

JMLR Copyright

This source code is supplied “as is” without warranty of any kind, and its author and the Journal of Machine Learning Research (JMLR) and JMLR’s publishers and distributors, disclaim any and all warranties, including but not limited to any implied warranties of merchantability and fitness for a particular purpose, and any warranties or non infringement. The user assumes all liability and responsibility for use of this source code, and neither the author nor JMLR, nor JMLR’s publishers and distributors, will be liable for damages of any kind resulting from its use. Without limiting the generality of the foregoing, neither the author, nor JMLR, nor JMLR’s publishers and distributors, warrant that the source code will be error-free, will operate without interruption, or will meet the needs of the user.

Introduction

BASS stands for Bayesian group factor Analysis with Structured Sparsity priors. It extends traditional factor analysis model to m coupled observation matrices (views).

BASS could be used to estimate both covariance specific to each observation matrix and shared variation across any subset of observations. Applications of BASS to construct condition specific gene co-expression networks and to find shared topics among different classes of documents have been demonstrated in the paper.

About the folders

  • simData contains simulation data sets used in the original paper.
  • code contains all source code of implementation.
  • output contains the output files/folders after running BASS.

Code

Compilation

BASS is implemented using C++. Use Makefile to compile the source code to an executable file. It requires installation of GNU Scientific Library (GSL). Make sure the library has been installed in your OS and the path has been correctly specified in Makefile.

Running

Shell script runBASS.sh provides an example of running BASS with simulation data set "Yn100sim5.sim". It generates following commands

./main -y ../simData/Yn100sim5.sim -sep space -k 15 -v 10 -p1 50 -p2 50 -p3 50 -p4 50 -p5 50 -p6 50 -p7 50 -p8 50 -p9 50 -p10 50 -n 100 -iter 20000 -step 50 -mcmc 0 -px 20 -output ../output/MCMC0PX20ik15n100

Explanation of arguments:

  • -y: joint data matrix file (p by n) with variables (features) are represented by row and subjects are in column
  • -sep: how the data are separated. arguments: "space" "tab"
  • -k: initial number of latent factors
  • -v: number of observations (views)
  • -p1 up to -pv: the dimension of each observation
  • -n: number of subjects
  • -iter: maximum iteration allowed
  • -step: number of steps to store parameters
  • -mcmc: number of MCMC steps
  • -px: number of PX-EM steps
  • -output: output directory

Analyzing results

R script analyze.R provides an example of analyzing outputs of BASS.

Acknowledgement

The source code RngStream.cpp, RngStream.h and gig_par.cpp, gig_par.h are downloaded from http://jonaswallin.github.io/articles/2013/07/simulation-of-gig-distribution/ to draw samples from generalized inverse Gaussian distribution.

bass's People

Contributors

judyboon avatar

Watchers

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