cobra icon indicating copy to clipboard operation
cobra copied to clipboard

181 alternative to q q plot to evaluate regression results

Open patrickleonardy opened this issue 1 year ago • 0 comments

Story Title

Alternative to Q-Q plot to evaluate regression results

Changes made

Added two functions to create plots to the RegressionEvaluator:

  • plot_residuals():
    • plots the residual vs the actual values.
    • plots also the 0 line to see if we are above or ben
  • plot_residuals_by_bin():
    • plots the residual vs the actual values binned.
    • binning strategy can be: uniform or quantile
    • number of bins can be chosen

How does the solution address the problem

Those two plots should be easier to interpret as the normal QQ-plot and thus can bring more value to discussions with business stakeholders.

Linked issues

Resolves #181

Plots

plot_residuals_by_bin(nbins = 5, binning_strat='uniform')

image

plot_residuals_by_bin(binning_strat='quantile', nbins=10)

image

evaluator.plot_residuals()

image

patrickleonardy avatar Nov 28 '23 16:11 patrickleonardy