Probe#

class ts3.probes.Probe[source]#

Bases: abc.ABC

A classifier fit on unit embeddings, scored by eval.py.

abstract fit_predict(train_embs, train_md, eval_embs, spec)[source]#

Fit on the pretrain units, return eval probabilities and what the fit learned.

The probabilities have shape (units, classes); the dict is whatever the fit is worth reporting about itself, empty for a probe with nothing to say.

Probabilities, not logits, and that is load-bearing: the multi-unit readout means neighbouring units together (ibl_bwb_eval.multi_unit.multi_unit_prediction()), and that rule is defined on probabilities. Columns follow spec.label_names; train_md is the TS3 unit table, so a probe that needs more than the region label (subject id, for a grouped split) reads it from there.

Return type:

tuple[ndarray, dict[str, Any]]