Whenever the user inputs any metric as a string rather than a list, the metric is taken as metric[0] whenever choosing between the maximum or minimum for the best fit. In this case, it will only grab the first letter of the string and convert it. In some cases, it will convert it incorrectly. For example: Whenever inputting any 'LLH' related metric as a string, it will not be found in METRICS_TO_MAXIMIZE.
From the function _fit_grid_scan:
if metric[0] in METRICS_TO_MAXIMIZE: best_idx = np.argmax(all_fit_metric_vals) best_idx_grid = np.unravel_index(best_idx, all_fit_metric_vals.shape)else: best_idx = np.argmin(all_fit_metric_vals) best_idx_grid = np.unravel_index(best_idx, all_fit_metric_vals.shape)
Whenever the user inputs any metric as a string rather than a list, the metric is taken as metric[0] whenever choosing between the maximum or minimum for the best fit. In this case, it will only grab the first letter of the string and convert it. In some cases, it will convert it incorrectly. For example: Whenever inputting any 'LLH' related metric as a string, it will not be found in METRICS_TO_MAXIMIZE. From the function _fit_grid_scan:
if metric[0] in METRICS_TO_MAXIMIZE: best_idx = np.argmax(all_fit_metric_vals) best_idx_grid = np.unravel_index(best_idx, all_fit_metric_vals.shape)
else: best_idx = np.argmin(all_fit_metric_vals) best_idx_grid = np.unravel_index(best_idx, all_fit_metric_vals.shape)