Package pylal :: Module plotutils :: Class ROCPlot
[hide private]
[frames] | no frames]

Class ROCPlot

source code

object --+    
         |    
 BasicPlot --+
             |
            ROCPlot

Plot the receiver operating characteristic (ROC) based on the foreground and background values from given techniques. For example, to compare SNR vs IFAR, do something like:

plot = ROCPlot("FAP", "EFF", "ROC IFAR vs SNR") plot.add_content(ifar_bg, ifar_fg, label="IFAR") plot.add_content(snr_bg, snr_fg, label="SNR") plot.finalize()

Instance Methods [hide private]
 
__init__(self, *args, **kwargs)
Basic plot initialization.
source code
 
add_content(self, bg, fg, eff_weight=None, **kwargs)
Enter a particular technique's background, foreground, and efficiency weights.
source code
 
finalize(self, loc=0)
Stub.
source code

Inherited from BasicPlot: add_legend_if_labels_exist, close, savefig

Inherited from object: __delattr__, __format__, __getattribute__, __hash__, __new__, __reduce__, __reduce_ex__, __repr__, __setattr__, __sizeof__, __str__, __subclasshook__

Properties [hide private]

Inherited from object: __class__

Method Details [hide private]

__init__(self, *args, **kwargs)
(Constructor)

source code 

Basic plot initialization. A subclass can override __init__ and call this one (plotutils.BasicPlot.__init__(self, *args, **kwargs)) and then initialize variables to hold data to plot and labels.

Overrides: object.__init__
(inherited documentation)

add_content(self, bg, fg, eff_weight=None, **kwargs)

source code 

Enter a particular technique's background, foreground, and efficiency weights. These should be one-dimensional arrays with the values of of your statistics for backgrounds and foregrounds. Eff_weight are weights on the efficiency, useful if, say, you have a different prior than your injection set reflects.

Overrides: BasicPlot.add_content

finalize(self, loc=0)

source code 

Stub. Replace with a function that creates and makes your plot pretty. Do not do I/O here.

Decorators:
  • @method_callable_once
Overrides: BasicPlot.finalize
(inherited documentation)