Skip to content

Commit

Permalink
inverse transform
Browse files Browse the repository at this point in the history
  • Loading branch information
timkucera committed Jan 12, 2024
1 parent 9629ebe commit ef2f49f
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 0 deletions.
6 changes: 6 additions & 0 deletions proteinshake/transform.py
Original file line number Diff line number Diff line change
Expand Up @@ -103,3 +103,9 @@ def stochastic_transform(self, Xy):
for transform in self.stochastic_transforms:
Xy = transform(Xy)
return Xy

def inverse_transform(self, y):
for transform in self.transforms:
if hasattr(transform, "inverse_transform"):
y = transform.inverse_transform(y)
return y
3 changes: 3 additions & 0 deletions tests/task.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,9 @@ def inverse_transform(self, y):
print("X", X.shape)
print("y", y.shape)
break
print("EVALUATION")
metrics = task.evaluate(np.ones((10,)) * 3, np.ones((10,)) * 5)
print(metrics)


if __name__ == "__main__":
Expand Down

0 comments on commit ef2f49f

Please sign in to comment.