• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

idanmoradarthas / DataScienceUtils / 21175393653 / 5
100%
master: 100%

Build:
DEFAULT BRANCH: master
Ran 20 Jan 2026 03:07PM UTC
Files 7
Run time 6s
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

20 Jan 2026 02:35PM UTC coverage: 99.565% (+0.007%) from 99.558%
21175393653.5

push

github

web-flow
Add Label Validation to plot_confusion_matrix (#92)

* feat: Add label validation to plot_confusion_matrix

Adds validation to ensure that `y_test`, `y_pred`, and `labels` contain the same set of unique values.

Raises a `ValueError` with a clear error message if there is a mismatch, indicating which values are missing or extra.

Includes a new test function `test_plot_confusion_matrix_label_mismatch` to verify the validation logic.

* refactor: Address feedback from code review

Removes unnecessary `.tolist()` calls in `ds_utils/metrics.py` and fixes the regex pattern in the corresponding test in `tests/test_metrics.py`.

The changes make the code more efficient and the tests more robust.

* docs: Update plot_confusion_matrix docstring

Updates the docstring for the `plot_confusion_matrix` function to describe the new validation behavior and updates the `:raises ValueError:` section accordingly.

---------

Co-authored-by: google-labs-jules[bot] <161369871+google-labs-jules[bot]@users.noreply.github.com>

687 of 690 relevant lines covered (99.57%)

1.0 hits per line

Source Files on job ubuntu-latest-python-3.10 - 21175393653.5
  • Tree
  • List 7
  • Changed 1
  • Source Changed 0
  • Coverage Changed 1
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Build 21175393653
  • 8d13ecca on github
  • Prev Job for on master (#21175371642.6)
  • Next Job for on master (#21429330775.10)
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc