{"id":19198148,"url":"https://github.com/mirkobunse/critdd","last_synced_at":"2025-05-09T00:53:00.622Z","repository":{"id":96599865,"uuid":"599652923","full_name":"mirkobunse/critdd","owner":"mirkobunse","description":"Critical difference diagrams with Python and Tikz","archived":false,"fork":false,"pushed_at":"2024-10-01T08:36:58.000Z","size":2986,"stargazers_count":33,"open_issues_count":5,"forks_count":3,"subscribers_count":3,"default_branch":"main","last_synced_at":"2025-05-09T00:52:53.265Z","etag":null,"topics":["benchmark","hypothesis-testing","machine-learning","post-hoc-analysis"],"latest_commit_sha":null,"homepage":"https://mirkobunse.github.io/critdd","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/mirkobunse.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2023-02-09T15:43:51.000Z","updated_at":"2025-05-05T15:05:09.000Z","dependencies_parsed_at":"2023-11-21T14:49:11.445Z","dependency_job_id":"ffa207a2-b6f4-4ea8-a996-c2b4d796cb76","html_url":"https://github.com/mirkobunse/critdd","commit_stats":null,"previous_names":[],"tags_count":4,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mirkobunse%2Fcritdd","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mirkobunse%2Fcritdd/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mirkobunse%2Fcritdd/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mirkobunse%2Fcritdd/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mirkobunse","download_url":"https://codeload.github.com/mirkobunse/critdd/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":253171235,"owners_count":21865289,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["benchmark","hypothesis-testing","machine-learning","post-hoc-analysis"],"created_at":"2024-11-09T12:20:16.491Z","updated_at":"2025-05-09T00:53:00.593Z","avatar_url":"https://github.com/mirkobunse.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"[![](https://img.shields.io/badge/docs-stable-blue.svg)](https://mirkobunse.github.io/critdd)\n[![CI](https://github.com/mirkobunse/critdd/workflows/CI/badge.svg)](https://github.com/mirkobunse/critdd/actions)\n\n\n# critdd | Critical Difference Diagrams\n\nThis Python package generates Tikz code for publication-ready vector graphics.\n\nCritical difference (CD) diagrams are a powerful tool to compare outcomes of multiple treatments over multiple observations. In machine learning research, for instance, we often compare the performance (= outcome) of multiple methods (= treatments) over multiple data sets (= observations).\n\n**Regular CD diagrams:** statistically indistinguishable methods are connected.\n\n\u003cimg alt=\"docs/source/example.svg\" src=\"docs/source/example.svg\" width=\"480\"\u003e\n\n**2D sequences:** sequences of multiple CD diagrams can be arranged in a single, 2-dimensional plot.\n\n\u003cimg alt=\"docs/source/2d_example.svg\" src=\"docs/source/2d_example.svg\" width=\"480\"\u003e\n\n\n## Installation\n\n```\npip install --upgrade pip setuptools wheel\npip install 'critdd @ git+https://github.com/mirkobunse/critdd'\n```\n\n\n## Quick start\n\nFor detailed information, visit [the documentation](https://mirkobunse.github.io/critdd).\n\nBasically, you use this package as follows:\n\n```python\nfrom critdd import Diagram\nimport pandas as pd\n\n# download example data\n_URL = \"https://raw.githubusercontent.com/hfawaz/cd-diagram/master/example.csv\"\ndf = pd.read_csv(_URL).pivot(\n    index = \"dataset_name\",\n    columns = \"classifier_name\",\n    values = \"accuracy\"\n)\n\n# create a CD diagram from the Pandas DataFrame\ndiagram = Diagram(\n    df.to_numpy(),\n    treatment_names = df.columns,\n    maximize_outcome = True\n)\n\n# inspect average ranks and groups of statistically indistinguishable treatments\ndiagram.average_ranks # the average rank of each treatment\ndiagram.get_groups(alpha=.05, adjustment=\"holm\")\n\n# export the diagram to a file\ndiagram.to_file(\n    \"example.tex\",\n    alpha = .05,\n    adjustment = \"holm\",\n    reverse_x = True,\n    axis_options = {\"title\": \"critdd\"},\n)\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmirkobunse%2Fcritdd","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmirkobunse%2Fcritdd","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmirkobunse%2Fcritdd/lists"}