multi_unit_prediction#

ibl_bwb_eval.multi_unit.multi_unit_prediction(pred_proba, depths, probe_ids)[source]#

Multi-unit averaging of prediction probabilities.

Method introduced in NEMO. Each unit’s probabilities are replaced by the mean over its MULTI_UNIT_MAX_NEIGHBORS nearest units on the same probe within MULTI_UNIT_RADIUS_UM, itself included.

Parameters:
  • pred_proba (ndarray) – prediction probabilities. Shape (units, n_classes)

  • depths (ndarray) – depths on the probe for each unit. Shape (units,)

  • probe_ids (ndarray) – string id of the probe for each unit. Shape (units,)

Returns:

averaged probabilities. Shape (units, n_classes). Callers should apply argmax to obtain predicted labels.

Return type:

averaged_proba