Coder Social home page Coder Social logo

ys7yoo / lnpfitting Goto Github PK

View Code? Open in Web Editor NEW

This project forked from pillowlab/lnpfitting

0.0 1.0 0.0 111 KB

Linear-Nonlinear-Poisson (LNP) model fitting via Maximally-Informative-Dimensions (MID) / maximum likelihood

License: MIT License

MATLAB 100.00%

lnpfitting's Introduction

LNPfitting

Linear-Nonlinear-Poisson (LNP) model fitting via maximum likelihood, aka Maximally-Informative-Dimensions (MID) in Matlab.

Description: Estimates the parameters of an LNP model from a stimulus and spike train using the maximally informative dimension (MID) estimator (introduced in Sharpee et al 2004). The LNP model model parameters consist of

  • a bank of (one or more) linear filters that perform dimensionality reduction
  • a nonlinear function that maps filter outputs to instantaneous spike rate

As shown in Williamson et al 2015, MID is a maximum likelihood estimator for the LNP model with a nonparametric (histogram-based) model for the nonlinearity.

Relevant publications:

Download

Usage

  • Launch matlab and cd into the directory containing the code (e.g. cd code/LNPfitting/).

  • Examine the demo scripts for annotated example analyses of simulated datasets:

    • demo1_1temporalfilter.m - estimate a single temporal filter using STA, iSTAC, GLM with exponential nonlinearity, and using ML / MID estimation of filter and a nonlinearity parametrized by radial basis functions. Shows validation using R^2 of true filter and single-spike information (log-likelihood).
    • demo2_2temporalfilters.m - similar, but for two-filter LNP models; shows how to plot inferred 2D nonlinearity.
    • demo3_3temporalfilters - compares iSTAC, and ML/MID estimates with cylindrical basis functions (CBFs) and with radial basis functions (RBFs) for parametrizing the nonlinearity.
    • demo4_1spacetimefilter.m - similar to demo1 but for 2D (space x time) binary white noise stimulus.
    • demo5_5spacetimefilters.m - similar to demo3, but recovers 5 space-time filters. Compares iSTAC, and ML/MID with CBFs and RBFs.

Notes

Primary differences between our implementation and that of Sharpee et al 2004:

  • Parametrizes the nonlinearity with smooth RBF (or CBF) basis functions (followed by a rectifying point nonlinearity to keep spike rates positive) instead of square histogram bins. This makes the log-likelihood differentiable and therefore easier to ascend.

  • Uses standard quasi-Newton optimization methods (fminunc or minFunc) instead of simulated annealing. (Thus no guarantee that it finds global optimum, but runtime is substantially faster and performance is high in simulated and real datasets considered so far).

lnpfitting's People

Contributors

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