pySPFM._solvers.debiasing.group_betas

Contents

pySPFM._solvers.debiasing.group_betas#

group_betas(betas, non_zero_idxs, group_dist=3)[source]#

Group betas based on the distance between non-zero coefficients.

Parameters:
  • betas ((T) ndarray) – Array containing the non-zero coefficients selected as neuronal-related.

  • non_zero_idxs ((T) ndarray) – Array containing the indexes of the non-zero coefficients.

  • group_dist (int, optional) – Maximum distance between non-zero coefficients to be considered as part of the same group, by default 3

Returns:

betas ((T) ndarray) – Array containing the non-zero coefficients selected as neuronal-related.