Lables of checkerboard plot in example of mcnemar_table do not match the documentation
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 5.2k
- Forks
- 916
- Avg merge
- 17h 31m
- Merged PRs (30d)
- 4
Description
Describe the documentation issue
https://rasbt.github.io/mlxtend/user_guide/evaluate/mcnemar_table/#example-2-2x2-contingency-table
The labels of the checkerboard plot do not seem to match the description of the returned value

tb is
array([[4, 1],
[2, 3]])
from returns in https://rasbt.github.io/mlxtend/user_guide/evaluate/mcnemar_table/#api
2x2 contingency table with the following contents: a: tb[0, 0]: # of samples that both models predicted correctly b: tb[0, 1]: # of samples that model 1 got right and model 2 got wrong c: tb[1, 0]: # of samples that model 2 got right and model 1 got wrong d: tb[1, 1]: # of samples that both models predicted incorrectly
- 4 (
tb[0, 0], a) is # of samples that model 1 and 2 got right - 1 (
tb[0, 1], b) is # of samples that model 1 got right and model 2 got wrong - 2 (
tb[1, 0], c) is # of samples that model 2 got right and model 1 got wrong - 3 (
tb[1, 1], d) is # of samples that model 1 and 2 got wrong
Suggest a potential improvement or addition
I think that reversing each labels will work.
brd = checkerboard_plot(tb,
figsize=(3, 3),
fmt='%d',
col_labels=['model 2 right', 'model 2 wrong'], # As is: ['model 2 wrong', 'model 2 right']
row_labels=['model 1 right', 'model 1 wrong']) # As is: ['model 1 wrong', 'model 1 right']
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the linked mcnemar_table documentation example and its API return description, then compare the checkerboard_plot row and column labels with the returned array. Update the labels or accompanying documentation so the four values match, and verify the rendered example and descriptions agree.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- documentation
- Issue type
- Documentation
- Difficulty
- 1/5
- Estimated time
- Under an hour
- Activity status
- Stale
- Clarity
- Clearly specified
- Newbie friendliness
- 45/100