tests.metrics.privacy#
tests.metrics.privacy.test_reidentification#
- tests.metrics.privacy.test_reidentification.reidentification_metrics_results(request, df_wbcd, df_mock_wbcd, metadata_wbcd)[source]#
Compute the reidentification metrics in different settings.
- Parameters:
request – the number of continuous and categorical columns to test
df_wbcd (
dict[str,DataFrame]) – the real Wisconsin Breast Cancer Dataset fixture, split into train and test setsdf_mock_wbcd (
dict[str,DataFrame]) – the mock wbcd dataset fixture, contained train and test setsmetadata_wbcd (
dict) – the wbcd metadata fixture
- Return type:
Tuple[Type[Metric],str,dict]- Returns:
a tuple containing the metric class, the dataset type and a dictionary containing the average scores of the metric and the detailed scores
- tests.metrics.privacy.test_reidentification.test_reidentification_metrics_summary(reidentification_metrics_results)[source]#
Test the reidentification metrics average scores.
- Parameters:
reidentification_metrics_results (
Tuple[Type[Metric],str,dict]) – a tuple containing the metric class, the dataset type and a dictionary containing the average scores of the metric and the detailed scores- Return type:
None- Returns:
None
- tests.metrics.privacy.test_reidentification.test_reidentification_metrics_detailed(reidentification_metrics_results)[source]#
Test the reidentification metrics detailed scores.
- Parameters:
reidentification_metrics_results (
Tuple[Type[Metric],str,dict]) – a tuple containing the metric class, the dataset type and a dictionary containing the average scores of the metric and the detailed scores- Return type:
None- Returns:
None
tests.metrics.privacy.test_report#
- tests.metrics.privacy.test_report.privacy_report(request, df_wbcd, df_mock_wbcd)[source]#
Compute the privacy report in different settings.
- Parameters:
request – the number of continuous and categorical columns to test
df_wbcd (
dict[str,DataFrame]) – the real Wisconsin Breast Cancer Dataset fixture, split into train and test setsdf_mock_wbcd (
dict[str,DataFrame]) – the mock wbcd dataset fixture, split into train, test and 2nd_gen sets
- Return type:
PrivacyReport- Returns:
an instance of the report
- tests.metrics.privacy.test_report.test_summary_report(privacy_report)[source]#
Test the summary report.
- Parameters:
privacy_report (
PrivacyReport) – the computed report fixture- Return type:
None- Returns:
None