fit_group#

pypillometry.signal.gaussmarkov.fit_group(bank, data, n_iter=5, tol=0.01, cov='diag', prior0=None, individual=None, n_jobs=None)[source]#

Empirical-Bayes fit of a group of recordings (see hierarchical).

Parameters:
  • bank (TimescaleBank) – the model, the same for all recordings

  • data (list of (y, fs, segments)) – the recordings: signal (NaN where missing), sampling rate in Hz and segments (list of (start, stop) or None), as for fit_bank()

  • n_iter (int) – maximum number of EM iterations (default 5)

  • tol (float) – stop when no entry of the group mean changes by more than this (default 0.01)

  • cov ({"diag", "full"}) – "diag" (default): the parameters vary independently between recordings; "full": with correlations, which need large groups (about 50 recordings did not determine them in tests)

  • prior0 (GaussianPrior or str, optional) – prior of the fits without pooling that start the algorithm; default: reference_prior()

  • individual (list of BankFit, optional) – fits without pooling from an earlier run (with Hessians), to skip the first step

  • n_jobs (int, optional) – number of processes (at most one per recording); None (default): all cores but one; 1: no parallel processes; negative as in joblib (-1: all cores). Inside a parallel process, “all cores” is its share.

Return type:

GroupFit