tests.metrics#

Subpackages#

Submodules#

tests.metrics.conftest#

tests.metrics.conftest.df_mock_wbcd(df_wbcd)[source]#

Generate the continuous mock Wisconsin Breast Cancer Dataset wbcd without ids.

Parameters:

df_wbcd (dict[str, DataFrame]) – the wbcd dataset fixture, split into train and test sets

Return type:

dict[str, DataFrame]

Returns:

the dataframe containing the mock wbcd dataset, split into train, test and 2nd_gen sets

tests.metrics.test_metareport#

tests.metrics.test_metareport.metareport(df_wbcd, df_mock_wbcd)[source]#

Compute the metareport in different settings.

Parameters:
  • df_wbcd (dict[str, DataFrame]) – the real Wisconsin Breast Cancer Dataset fixture, split into train and test sets

  • df_mock_wbcd (dict[str, DataFrame]) – the mock wbcd dataset fixture, split into train, test and 2nd_gen sets

Return type:

Metareport

Returns:

an instance of the metareport

tests.metrics.test_metareport.test_summary_report(metareport)[source]#

Test the summary metareport.

Parameters:

metareport (Metareport) – the computed metareport fixture

Return type:

None

Returns:

None

tests.metrics.test_metareport.test_save_load_report(metareport)[source]#

Test the save/load operations for the metareport.

Parameters:

metareport (Metareport) – the computed metareport fixture

Return type:

None

Returns:

None

tests.metrics.test_report#

tests.metrics.test_report.report(request, df_wbcd, df_mock_wbcd)[source]#

Compute the generic report in different settings.

Parameters:
  • request – the list of metrics to test

  • df_wbcd (dict[str, DataFrame]) – the real Wisconsin Breast Cancer Dataset fixture, split into train and test sets

  • df_mock_wbcd (dict[str, DataFrame]) – the mock wbcd dataset fixture, split into train, test and 2nd_gen sets

Return type:

Report

Returns:

an instance of the report

tests.metrics.test_report.test_summary_report(report)[source]#

Test the summary report.

Parameters:

report (Report) – the computed report fixture

Return type:

None

Returns:

None

tests.metrics.test_report.test_save_load_report(report)[source]#

Test the save/load operations for the generic report.

Parameters:

report (Report) – the computed report fixture

Return type:

None

Returns:

None

tests.metrics.test_report.test_assertion_error_metrics(metrics)[source]#

Test that an exception is raised when no or a wrong metric is provided.

Parameters:

metrics (list[str]) – the metrics to test

Return type:

None

Returns:

None