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 b6354fd commit 5fdb9f5
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 28 deletions.
14 changes: 0 additions & 14 deletions sdmetrics/single_column/statistical/key_uniqueness.py
Original file line number Diff line number Diff line change
Expand Up @@ -67,17 +67,3 @@ def compute(cls, real_data, synthetic_data):
The proportion of data points in the synthetic data that are unique.
"""
return cls.compute_breakdown(real_data, synthetic_data)['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)
14 changes: 0 additions & 14 deletions tests/unit/single_column/statistical/test_key_uniqueness.py
Original file line number Diff line number Diff line change
Expand Up @@ -52,17 +52,3 @@ def test_compute(self, compute_breakdown_mock):
# Assert
compute_breakdown_mock.assert_called_once_with(real_data, synthetic_data)
assert result == 0.6

@patch('sdmetrics.single_column.statistical.key_uniqueness.SingleColumnMetric.normalize')
def test_normalize(self, normalize_mock):
"""Test the ``normalize`` method."""
# Setup
metric = KeyUniqueness()
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

0 comments on commit 5fdb9f5

Please sign in to comment.