Skip to content

Commit

Permalink
remove normalize
Browse files Browse the repository at this point in the history
  • Loading branch information
R-Palazzo committed Oct 24, 2023
1 parent 32f9cca commit 89807f6
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 29 deletions.
14 changes: 0 additions & 14 deletions sdmetrics/single_table/table_format.py
Original file line number Diff line number Diff line change
Expand Up @@ -87,17 +87,3 @@ def compute(cls, real_data, synthetic_data, ignore_dtype_columns=None):
The metric score.
"""
return cls.compute_breakdown(real_data, synthetic_data, ignore_dtype_columns)['score']

@classmethod
def normalize(cls, raw_score):
"""Return the `raw_score` as is, since it is already normalized.
Args:
raw_score (float):
The value of the metric from `compute`.
Returns:
float:
The normalized value of the metric
"""
return super().normalize(raw_score)
16 changes: 1 addition & 15 deletions tests/unit/single_table/test_table_format.py
Original file line number Diff line number Diff line change
Expand Up @@ -194,18 +194,4 @@ def test_compute(self, compute_breakdown_mock, real_data):

# Assert
compute_breakdown_mock.assert_called_once_with(real_data, synthetic_data, None)
assert result == 0.6

@patch('sdmetrics.single_table.table_format.SingleTableMetric.normalize')
def test_normalize(self, normalize_mock):
"""Test the ``normalize`` method."""
# Setup
metric = TableFormat()
raw_score = 0.9

# Run
result = metric.normalize(raw_score)

# Assert
normalize_mock.assert_called_once_with(raw_score)
assert result == normalize_mock.return_value
assert result == 0.6

0 comments on commit 89807f6

Please sign in to comment.