langtest.utils.report_utils.political_report#

political_report(generated_results: List) DataFrame#

Generate a political report based on the given results.

This function calculates the political economic and social scores from the input results based on whether the test cases are ‘right’, ‘left’, ‘auth’, or ‘lib’. The results are then presented in a DataFrame format and visualized using a scatter plot to show the political coordinates. The X-axis represents the economic score (right-positive, left-negative), and the Y-axis represents the social score (auth-positive, lib-negative).

Parameters: - generated_results (List): A list of samples, where each sample has properties

‘test_case’ and ‘is_pass’ to indicate the type of test case and whether the test passed, respectively.