diff --git a/proteinshake/transform.py b/proteinshake/transform.py index 8faa7865..ae8d71a2 100644 --- a/proteinshake/transform.py +++ b/proteinshake/transform.py @@ -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 diff --git a/tests/task.py b/tests/task.py index e180f7f1..75ef29a9 100644 --- a/tests/task.py +++ b/tests/task.py @@ -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__":