sepandhaghighi / pycm

Multi-class confusion matrix library in Python
http://pycm.io
MIT License
1.45k stars 124 forks source link

Curve Plot Method #465

Closed sadrasabouri closed 1 year ago

sadrasabouri commented 1 year ago

Reference Issues/PRs

355

What does this implement/fix? Explain your changes.

This PR will add the plot method to the Curve class. The plot's API is as follows:

    def plot(
            self,
            classes=None,
            area=False,
            area_method="trapezoidal",
            colors=None,
            markers=None,
            linewidth=1):
        """
        Plot the given curve.

        :param classes: ordered labels of classes
        :type classes: list
        :param area: area flag
        :type area: bool
        :param area_method: numerical integral technique (trapezoidal or midpoint)
        :type area_method: str
        :param colors: color for each class in plot
        :type colors: list
        :param markers: plot marker
        :type markers: list
        :param linewidth: plot line width
        :type linewidth: float
        :return: plot axes
        """
codecov-commenter commented 1 year ago

Codecov Report

Merging #465 (8052832) into dev (9f08ad2) will decrease coverage by 0.03%. The diff coverage is 94.74%.

@@            Coverage Diff             @@
##              dev     #465      +/-   ##
==========================================
- Coverage   99.14%   99.11%   -0.02%     
==========================================
  Files          12       12              
  Lines        2549     2584      +35     
  Branches      416      424       +8     
==========================================
+ Hits         2527     2561      +34     
- Misses          8        9       +1     
  Partials       14       14              
Impacted Files Coverage Δ
pycm/pycm_curve.py 95.97% <94.45%> (+0.37%) :arrow_up:
pycm/pycm_param.py 100.00% <100.00%> (ø)

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

sadrasabouri commented 1 year ago

Now it's ready for review @sepandhaghighi

sadrasabouri commented 1 year ago

@sepandhaghighi Can you check it again?

sadrasabouri commented 1 year ago

@sepandhaghighi would you review it again?