• Stars
    star
    158
  • Rank 237,131 (Top 5 %)
  • Language
    MATLAB
  • License
    MIT License
  • Created over 6 years ago
  • Updated 8 months ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

An algorithm for unsupervised discovery of sequential structure

seqNMF

Unsupervised discovery of temporal sequences in high-dimensional datasets, with applications to neuroscience

Emily Mackevicius and Andrew Bahle - FeeLab 🎶 🐦 2018

Description

SeqNMF is an algorithm which uses regularized convolutional non-negative matrix factorization to extract repeated sequential patterns from high-dimensional data. It has been validated using neural calcium imaging, spike data, and spectrograms, and allows the discovery of patterns directly from timeseries data without reference to external markers.

For more information see our paper; COSYNE talk; tutorial video and materials; and Simons foundation article.

Usage

The main function is seqNMF.m and it can be called

[W,H,cost,loadings,power] = seqNMF(X,'K',K,'L',L,'lambda',0.01)

Where X is the data matrix, K and L are the factorization parameters and lambda is a parameter controling the strength of regularization.

Specifically seqNMF factorizes the NxT data matrix X into K factors. Factor exemplars are returned in the NxKxL tensor W. Factor timecourses are returned in the KxT matrix H

                                ----------    
                            L  /         /|
                              /         / |
    ----------------         /---------/  |          ----------------
    |              |         |         |  |          |              |
  N |      X       |   =   N |    W    |  /   (*)  K |      H       |           
    |              |         |         | /           |              |
    ----------------         /----------/            ----------------
           T                      K                         T

Demo

See the demo script, for a demonstration of the seqNMF algorithm on synthetic data and songbird imaging data. This demo also gives examples of how to cross validate, test for significance and select parameters.