DistrictDataLabs / yellowbrick

Visual analysis and diagnostic tools to facilitate machine learning model selection.
http://www.scikit-yb.org/
Apache License 2.0
4.3k stars 559 forks source link

BUG: Corrects legend issues other than R2 in PredictionError #1212

Closed pkaf closed 2 years ago

pkaf commented 2 years ago

This PR addresses the issue raised at #1086

Unfortunately, generic .score() method in scikit-learn does not return the name of the scoring metrics used. The fix I have patched will return correct label if and when estimator has attribute providing the name of the scoring metric otherwise it will fall back to the default value i.e. R2 ![Uploading Screen Shot 2022-01-25 at 9.32.33 pm.png…]()

codecov[bot] commented 2 years ago

Codecov Report

Merging #1212 (715d1c3) into develop (2eb8e3e) will decrease coverage by 0.00%. The diff coverage is 88.88%.

Impacted file tree graph

@@             Coverage Diff             @@
##           develop    #1212      +/-   ##
===========================================
- Coverage    90.43%   90.42%   -0.01%     
===========================================
  Files           90       90              
  Lines         5089     5096       +7     
===========================================
+ Hits          4602     4608       +6     
- Misses         487      488       +1     
Impacted Files Coverage Δ
yellowbrick/regressor/prediction_error.py 93.44% <88.88%> (-1.01%) :arrow_down:

Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update 2eb8e3e...715d1c3. Read the comment docs.