Skip to main content

py_gpfa_em

Function py_gpfa_em 

Source
pub(crate) fn py_gpfa_em<'py>(
    py: Python<'py>,
    y: PyReadonlyArray1<'py, f64>,
    n_neurons: usize,
    n_bins: usize,
    c0: PyReadonlyArray1<'py, f64>,
    d0: PyReadonlyArray1<'py, f64>,
    r0_diag: PyReadonlyArray1<'py, f64>,
    tau: PyReadonlyArray1<'py, f64>,
    n_latents: usize,
    max_iter: usize,
    tol: f64,
) -> PyResult<(Bound<'py, PyArray1<f64>>, Bound<'py, PyArray1<f64>>, Bound<'py, PyArray1<f64>>, Bound<'py, PyArray1<f64>>, Vec<f64>)>
Expand description

Run the GPFA EM loop from a caller-supplied deterministic initialisation.

Parity contract with sc_neurocore.analysis.spike_stats.gpfa.gpfa_em: identical inputs (the PCA init computed once in Python) produce the same trajectories, parameters and exact-marginal log-likelihoods up to floating-point round-off.