Skip to main content

Module gpfa

Module gpfa 

Source

Structsยง

GpfaResult
GPFA result.

Functionsยง

chol_logdet ๐Ÿ”’
log-determinant of an SPD matrix from its Cholesky factor (2 ฮฃ log L_ii).
gp_kernel ๐Ÿ”’
Squared-exponential GP kernel for n time points.
gpfa
Extract smooth latent trajectories from parallel spike trains via EM.
gpfa_e_step ๐Ÿ”’
E-step: joint Gaussian posterior p(x|y) over all latents and time points.
gpfa_em_from_init
Run the GPFA EM loop from a fixed initialisation (the dispatchable kernel).
gpfa_log_likelihood ๐Ÿ”’
Exact marginal Gaussian log-likelihood via the Woodbury identity.
gpfa_m_step ๐Ÿ”’
M-step: update C, d, R.
gpfa_precision ๐Ÿ”’
Assemble the posterior precision M = blkdiag(K_jโปยน) + Aแต€RโปยนA (row-major, n_state ร— n_state with n_state = n_latents ยท n_bins) and the GP prior log-determinant log|K|.
gpfa_transform
Project new spike trains using learned GPFA parameters.
spd_cholesky ๐Ÿ”’
Cholesky factor of a symmetric positive-definite row-major matrix (LAPACK-grade dense linear algebra via nalgebra). GPFA only factors SPD matrices โ€” the GP prior, the posterior precision and the second-moment matrix โ€” so the decomposition is the numerically stable, ~2x cheaper choice over a general LU.
spd_inverse ๐Ÿ”’
Inverse of an SPD matrix (row-major in, row-major out) via Cholesky.

Type Aliasesยง

GpfaEmOutput
EM output: (trajectories, C, d, R_diag, log_likelihoods).