Skip to content
Snippets Groups Projects
Commit 69bd13ce authored by Amir MOHAMMADI's avatar Amir MOHAMMADI
Browse files

Use plot.roc instead of plot.roc_for_far in vulnerability ROC plots

parent bed08162
Branches
Tags
1 merge request!63Use plot.roc instead of plot.roc_for_far in vulnerability ROC plots
Pipeline #31340 passed
...@@ -435,6 +435,7 @@ class BaseVulnDetRoc(VulnPlot): ...@@ -435,6 +435,7 @@ class BaseVulnDetRoc(VulnPlot):
self._fnmrs_at = ctx.meta.get('fnmr', []) self._fnmrs_at = ctx.meta.get('fnmr', [])
self._real_data = True if real_data is None else real_data self._real_data = True if real_data is None else real_data
self._legend_loc = None self._legend_loc = None
self._min_dig = -4 if self._min_dig is None else self._min_dig
def compute(self, idx, input_scores, input_names): def compute(self, idx, input_scores, input_names):
''' Implements plots''' ''' Implements plots'''
...@@ -626,12 +627,14 @@ class RocVuln(BaseVulnDetRoc): ...@@ -626,12 +627,14 @@ class RocVuln(BaseVulnDetRoc):
def _plot(self, x, y, points, **kwargs): def _plot(self, x, y, points, **kwargs):
LOGGER.info("Plot ROC") LOGGER.info("Plot ROC")
plot.roc_for_far( plot.roc(
x, y, x, y,
far_values=plot.log_values(self._min_dig or -4), npoints=self._points,
CAR=self._semilogx, CAR=self._semilogx,
color=kwargs.get('color'), linestyle=kwargs.get('linestyle'), min_far=self._min_dig,
label=kwargs.get('label') color=kwargs.get('color'),
linestyle=kwargs.get('linestyle'),
label=kwargs.get('label'),
) )
def _get_farfrr(self, x, y, thres): def _get_farfrr(self, x, y, thres):
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment