Giter Site home page Giter Site logo

locanmf's Introduction

LocaNMF

LocaNMF (Localized semi-Nonnegative Matrix Factorization) can efficiently decompose widefield video data and allows user to directly compare activity across multiple mice by outputting mouse-specific localized functional regions. LocaNMF uses a fast low-rank version of Hierarchical Alternating Least Squares (HALS), and outputs components that are significantly more interpretable than traditional NMF or SVD-based techniques. Read more about this method and the results it provides in our bioRxiv : Saxena et al., 2019!

It is built on top of PyTorch, written in Python and C++, and is capable to run on either CPU or Nvidia CUDA-enabled GPU. To run LocaNMF on Nvidia GPU, a Nvidia CUDA-enabled GPU is required and the latest version Nvidia Driver (version > 418.x) is required to be properly installed before installing LocaNMF software.

Install

It is recommended to use conda to manage the dependencies for LocaNMF in it's own Python environment. First, download and install conda. Verify conda installation by executing the following scripts. A list of base environment packages will be displayed.

conda list

Create a new environment for LocaNMF and install LocaNMF software and all of its dependencies.

conda create -n locanmf python=3.6 locanmf -c ss5513 -c pytorch

Use LocaNMF

Activate locanmf conda environment.

conda activate locanmf

To test the proper installation of LocaNMF software, execute the following script.

python
from locanmf import LocaNMF
LocaNMF.version()

The following output will be displayed. It implies that LocaNMF and its dependencies have been properly installed.

python
Python 3.6.8 |Anaconda, Inc.| (default, Dec 30 2018, 01:22:34) 
[GCC 7.3.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> from  locanmf import LocaNMF
>>> LocaNMF.version()
version = 1.1
>>>

Please download the demo folder in this repository to your computer and walk through the demo_simulation.ipynb notebook to try out the software.

To run the notebook, in terminal, change directory to the downloaded demo folder, then execute,

jupyter-lab &

to start jupyter-lab server. In the pop-out web browser, double-click the notebook to open it. The code is editable and can be run cell by cell by pressing "shift + enter".

LocaNMF documentation is also available.

Preprocessing

Check out MATLAB code to preprocess your data for LocaNMF.

locanmf's People

Contributors

jw3132 avatar ss5513 avatar ikinsella avatar

Watchers

James Cloos 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.