RRRReadoutWithISI#

class ts2.models.single_session.RRRReadoutWithISI(rank=None, ridge_lambda=None)[source]#

Bases: ts2.models.single_session.stat_baseline.co_smoothing._readout_base.RRRReadoutBase

Reduced-rank readout over [counts, time-since-last-spike, last ISI].

Parameters:
  • rank (Optional[int]) – reduced rank k. None selects on val.

  • ridge_lambda (Optional[float]) – ridge strength. None selects on val.

input_fn(data)[source]#

Attached to the dataset transform pipeline by the trainer.

The target is built by IBLBrainWideBenchTS2._get_target, not here.

Return type:

dict

fit(train_dataset, val_dataset)[source]#

Fit on train, select hyperparameters on val, and record val_score.

Subclasses pull what they need via _windows() or off the dataset. The mean rate needs neither, so this is a no-op and the default val_score already covers it (see MeanRate).

predict(spikes, tsls=None, last_isi=None, **_)[source]#

Log-rates (B, T, N).

At test the held-out entries are already zeroed, so the observed population / past is exactly the non-masked data.

Return type:

Tensor