rasbt / rasbt/mlxtend

plot_decision_regions: allow arbitrary class labels

Open
#435 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Enhancement
Dominant language
Python
Stars
5.2k
Forks
916
Avg merge
17h 31m
Merged PRs (30d)
4

Description

Please note that this functions assumes that class labels are labeled consecutively, e.g,. 0, 1, 2, 3, 4, and 5

Would it be much effort to remove that restriction? I just wondered why my testcase with classes [99,100] had its contour color reversed.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Locate the plot_decision_regions entry point and inspect how class labels are mapped to contour colors. Reproduce the reported case with classes [99, 100], then add coverage showing that arbitrary labels receive the expected colors; done means the restriction on consecutive labels is removed without reversing the contour colors.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
data-visualization, machine-learning
Issue type
Bug
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
42/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.