Skip to content

Commit

Permalink
zero out transformed values that are larger than 1e30
Browse files Browse the repository at this point in the history
  • Loading branch information
paulsonak committed Dec 13, 2024
1 parent b0940ad commit a7eb892
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions atomsci/ddm/pipeline/transformations.py
Original file line number Diff line number Diff line change
Expand Up @@ -289,6 +289,8 @@ def transform_array(self, X, y, w, ids):
X = np.nan_to_num((X - self.X_means) * X_weight / self.X_stds)
else:
X = np.nan_to_num(X * X_weight / self.X_stds)
# zero out large values, especially for out of range test data
X[np.abs(X) > 1e30] = 0
if self.transform_y:
if not hasattr(self, 'move_mean') or self.move_mean:
y = np.nan_to_num((y - self.y_means) / self.y_stds)
Expand Down

0 comments on commit a7eb892

Please sign in to comment.