diff --git a/CHANGELOG.md b/CHANGELOG.md index 9b0e53f..66fa39c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,6 +6,7 @@ ### 🐛Fixed - Error when checking the number of streamlines in the weighted LASSO function - Error in verifying voxel correspondence between the lesion mask passed through the dictionary and the ISO weights map +- Error when checking the number of streamlines in the grouping structure for group LASSO regularization --- --- diff --git a/commit/core.pyx b/commit/core.pyx index e0754ed..8ec68e6 100644 --- a/commit/core.pyx +++ b/commit/core.pyx @@ -1115,7 +1115,7 @@ cdef class Evaluation : # check if group_idx contains all the indices of the input streamlines if regularisation['regIC'] == 'group_lasso' or regularisation['regIC'] == 'sparse_group_lasso': all_idx_in = np.sort(np.unique(np.concatenate(dictIC_params['group_idx']))) - all_idx = np.arange(self.DICTIONARY['IC']['nSTR'], dtype=np.int32) + all_idx = np.arange(self.DICTIONARY['TRK']['kept'].size, dtype=np.int32) if np.any(all_idx_in != all_idx): logger.error('Group indices must contain all the indices of the input streamlines')