diff options
Diffstat (limited to 'lib/parameters.py')
-rw-r--r-- | lib/parameters.py | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/lib/parameters.py b/lib/parameters.py index f680908..46a1e10 100644 --- a/lib/parameters.py +++ b/lib/parameters.py @@ -1134,9 +1134,15 @@ class ModelAttribute: if not ignore_index[i]: param_to_fit_param[i] = j j += 1 - mutual_information = sklearn.feature_selection.mutual_info_regression( - fit_parameters, data - ) + try: + mutual_information = ( + sklearn.feature_selection.mutual_info_regression( + fit_parameters, data + ) + ) + except ValueError as e: + logger.debug(f"mutual_info_regression failed: {e}") + mutual_information = [np.inf for _ in range(len(fit_parameters[0]))] if loss_ignore_scalar: ffs_eligible_params = list() |