generalized linear models logistic regression
play

Generalized Linear Models & Logistic Regression Jonathan - PowerPoint PPT Presentation

Generalized Linear Models & Logistic Regression Jonathan Pillow Mathematical Tools for Neuroscience (NEU 314) Spring, 2016 lecture 17 Example 3: unknown neuron 100 75 (spike count) 50 25 0 -25 0 25 (contrast) What model


  1. Generalized Linear Models & 
 Logistic Regression Jonathan Pillow Mathematical Tools for Neuroscience (NEU 314) Spring, 2016 lecture 17

  2. Example 3: unknown neuron 100 75 (spike count) 50 25 0 -25 0 25 (contrast) What model would you use to fit this neuron?

  3. Linear-Nonlinear-Poisson model Poisson nonlinearity stimulus filter spiking k λ ( t ) f stimulus conditional intensity (“spike rate”) Poisson spiking • example of generalized linear model (GLM)

  4. Aside on GLMs: 1. Be careful about terminology: GLM ≠ GLM General Linear Model Generalized Linear Model (Nelder 1972) Linear Linear

  5. 2003 interview with John Nelder... Stephen Senn : I must confess to having some confusion when I was a young statistician between general linear models and generalized linear models. Do you regret the terminology? John Nelder : I think probably I do. I suspect we should have found some more fancy name for it that would have stuck and not been confused with the general linear model, although general and generalized are not quite the same. I can see why it might have been better to have thought of something else. Senn, (2003). Statistical Science

  6. Moral: Be careful when naming your model!

  7. 2. General Linear Model Linear Noise (exponential family) “Dimensionality Reduction” Examples: 1. Gaussian 2. Poisson

  8. 3. Generalized Linear Model Linear Noise Nonlinear (exponential family) Examples: 1. Gaussian 2. Poisson

  9. Linear-Nonlinear-Poisson exponential Poisson stimulus filter nonlinearity spiking stimulus λ ( t ) k f conditional intensity (“spike rate”) • output: Poisson process 


  10. (Truccolo et al 04) GLM with spike-history dependence probabilistic exponential stimulus filter spiking nonlinearity + stimulus post-spike filter conditional intensity (spike rate) • output: product of stimulus and spike-history term

  11. GLM dynamic behaviors • irregular spiking (Poisson process) stimulus filter outputs (“currents”) p(spike) post-spike filter h(t)

  12. GLM dynamic behaviors • regular spiking stimulus filter outputs (“currents”) p(spike) post-spike filter h(t)

  13. GLM dynamic behaviors • bursting stimulus filter outputs (“currents”) p(spike) post-spike filter h(t)

  14. GLM dynamic behaviors • adaptation stimulus filter outputs (“currents”) p(spike) post-spike filter h(t)

  15. multi-neuron GLM probabilistic exponential stimulus filter spiking nonlinearity + post-spike filter neuron 1 stimulus + neuron 2

  16. multi-neuron GLM probabilistic exponential stimulus filter spiking nonlinearity + post-spike filter neuron 1 stimulus coupling filters + neuron 2

  17. GLM equivalent diagram: ... time t conditional intensity (spike rate)

  18. Logistic Regression GLM for binary classification sigmoid Bernoulli weights input “0” or “1” 1. Linear weights 2. sigmoid (“logistic”) 
 function 3. Bernoulli (coin flip)

  19. Logistic Regression GLM for binary classification sigmoid Bernoulli weights input “0” or “1” compact expression: (note when y = 1, this is equal to exp(wx)/(1+exp(wx)), which is equal to 1/(1+exp(-wx) )

  20. Logistic Regression GLM for binary classification sigmoid Bernoulli weights input “0” or “1” compact expression: fit w by maximizing log-likelihood:

  21. Logistic Regression geometric view p = 0.5 contour (classification boundary) neuron 2 spikes neuron 1 spikes

  22. Bayesian Estimation three basic ingredients: 1. Likelihood jointly determine the posterior 2. Prior L (ˆ “cost” of making an estimate θ , θ ) 3. Loss function if the true value is • fully specifies how to generate an estimate from the data Bayesian estimator is defined as: Z ˆ L (ˆ θ ( m ) = arg min θ , θ ) p ( θ | m ) d θ “Bayes’ risk” ˆ θ

  23. Typical Loss functions and Bayesian estimators L (ˆ θ , θ ) = (ˆ θ − θ ) 2 1. squared error loss 0 need to find minimizing the expected loss: Differentiate with respect to and set to zero: “posterior mean” also known as Bayes’ Least Squares (BLS) estimator

  24. Typical Loss functions and Bayesian estimators L (ˆ θ , θ ) = 1 − δ (ˆ “zero-one” loss 
 θ − θ ) 2. (1 unless ) 0 expected loss: which is minimized by: • posterior maximum (or “mode”). • known as maximum a posteriori (MAP) estimate.

Recommend


More recommend