Closed bbengfort closed 1 year ago
Merging #1300 (c9bf30a) into develop (5f12bc3) will increase coverage by
0.00%
. The diff coverage is100.00%
.
@@ Coverage Diff @@
## develop #1300 +/- ##
========================================
Coverage 90.88% 90.89%
========================================
Files 93 93
Lines 5301 5303 +2
========================================
+ Hits 4818 4820 +2
Misses 483 483
Impacted Files | Coverage Δ | |
---|---|---|
yellowbrick/cluster/elbow.py | 97.84% <100.00%> (+0.03%) |
:arrow_up: |
:mega: We’re building smart automated test selection to slash your CI/CD build times. Learn more
This PR fixes #1296 which reported that Yellowbrick was being too restrictive of what distance metrics were allowed to be used with the KElbow visualizer and did not generalize to all scikit-learn distance metrics.
I have made the following changes:
DISTANCE_METRICS
string constantssklearn.metrics.DistanceMetric.get_metric
to validate if the metric was good or not.There was already a test in place for testing that a
YellowbrickValueError
is raised if a bad metric is passed into the visualizer, and this test is still passing.Sample Code and Plot
Previously we were unable to run the following code, it should now be possible:
CHECKLIST
pytest
?make html
(must be run fromdocs/
)?