DetPlot¶
-
class
bosaris.
DetPlot
(window_style='old', plot_title='')[source]¶ A class for creating a plot for displaying detection performance with the axes scaled and labelled so that a normal Gaussian distribution will plot as a straight line.
The y axis represents the miss probability.
The x axis represents the false alarm probability.
- Attr __plotwindow__
PlotWindow object to plot into
- Attr __title__
title of the plot
- Attr __sys_name__
list of IDs of the systems
- Attr __tar__
list of arrays of of target scores for each system
- Attr __non__
list of arrays of the non-target scores for each system
- Attr __figure__
figure to plot into
-
create_figure
(idx=0)[source]¶ Create a figure to plot the DET-curve. Default plot everything on one single figure
- Parameters
idx – Index of the figure to create. Default is 0.
-
plot_DR30_both
(idx=0, plot_args_fa=0, 0, 0, '--', 1, plot_args_miss=0, 0, 0, '--', 1, legend_string='')[source]¶ Plots two lines indicating Doddington’s Rule of 30 points: one for false alarms and one for misses. See the documentation of plot_DR30_fa and plot_DR30_miss for details.
- Parameters
idx – index of the figure to plot in
plot_args_fa – A tuple of arguments to be passed to ‘plot’ that control the appearance of the DR30_fa point.
plot_args_miss – A tuple of arguments to be passed to ‘plot’ that control the appearance of the DR30_miss point.
legend_string – Optional. A string to describe this curve in the legend.
-
plot_DR30_fa
(idx=0, plot_args=0, 0, 0, '--', 1, legend_string='')[source]¶ Plots a vertical line indicating the Doddington 30 point for false alarms. This is the point left of which the number of false alarms is below 30, so that the estimate of the false alarm rate is no longer good enough to satisfy Doddington’s Rule of 30.
- Parameters
idx – index of the figure to plot in
plot_args – A cell array of arguments to be passed to ‘plot’ that control the appearance of the curve.
legend_string – Optional. A string to describe this curve in the legend.
-
plot_DR30_miss
(idx=0, plot_args=0, 0, 0, '--', 1, legend_string='')[source]¶ Plots a horizontal line indicating the Doddington 30 point for misses. This is the point above which the number of misses is below 30, so that the estimate of the miss rate is no longer good enough to satisfy Doddington’s Rule of 30.
- Parameters
idx – index of the figure to plot in
plot_args – A cell array of arguments to be passed to ‘plot’ that control the appearance of the curve.
legend_string – Optional. A string to describe this curve in the legend.
-
plot_mindcf_point
(target_prior, idx=0, plot_args='ok', legend_string='')[source]¶ Places the mindcf point for the current system.
- Parameters
target_prior – The effective target prior.
idx – inde of the figure to plot in
plot_args – a list of arguments to be passed to ‘plot’ that control the appearance of the curve.
legend_string – Optional. A string to describe this curve in the legend.
-
plot_rocch_det
(idx=0, style='color', target_prior=0.001, plot_args='')[source]¶ Plots a DET curve using the ROCCH.
- Parameters
idx – index of the figure to plot on
style – style of the DET-curve (see DetPlot description)
target_prior – prior of the target trials
plot_args – a list of arguments to be passed to plot that control the appearance of the curve.
-
plot_steppy_det
(idx=0, style='color', plot_args='')[source]¶ Plots a DET curve.
- Parameters
idx – the idx of the curve to plot in case tar and non have several dimensions
style – style of the curve, can be gray or color
plot_args – a cell array of arguments to be passed to plot that control the appearance of the curve.
-
set_system
(tar, non, sys_name='')[source]¶ Sets the scores to be plotted. This function must be called before plots are made for a system, but it can be called several times with different systems (with calls to plotting functions in between) so that curves for different systems appear on the same plot.
- Parameters
tar – A vector of target scores.
non – A vector of non-target scores.
sys_name – A string describing the system. This string will be prepended to the plot names in the legend. You can pass an empty string to this argument or omit it.
-
set_system_from_scores
(scores, key, sys_name='')[source]¶ Sets the scores to be plotted. This function must be called before plots are made for a system, but it can be called several times with different systems (with calls to plotting functions in between) so that curves for different systems appear on the same plot.
- Parameters
scores – A Scores object containing system scores.
key – A Key object for distinguishing target and non-target scores.
sys_name – A string describing the system. This string will be prepended to the plot names in the legend. You can pass an empty string to this argument or omit it.