Skip to content

Commit

Permalink
data imputation fix
Browse files Browse the repository at this point in the history
  • Loading branch information
Advitya17 committed Dec 4, 2023
1 parent 01051c3 commit 6f547f4
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions erroranalysis/erroranalysis/analyzer/error_analyzer.py
Original file line number Diff line number Diff line change
Expand Up @@ -476,12 +476,12 @@ def compute_importances(self, error_correlation_method=MUTUAL_INFO):
IMPORTANCES_THRESHOLD)
input_data = input_data[indexes]
diff = diff[indexes]
# For numerical data types to make calculation/imputation error-free
input_data = input_data.astype(float)
try:
importances = self._compute_error_correlation(
input_data, diff, error_correlation_method)
except ValueError:
# For numerical data types to make calculation/imputation error-free
input_data = input_data.astype(float)
# Impute input_data if it contains NaNs, infinity or a value too
# large for dtype('float64')
input_data = np.nan_to_num(input_data)
Expand Down

0 comments on commit 6f547f4

Please sign in to comment.