![]() |
Belle II Software release-09-00-03
|
Public Member Functions | |
| def | __init__ (self, data, column, masks=dict(), weight_column=None, bins=100, equal_frequency=True, range_in_std=None) |
| def | get_hist (self, name=None) |
| def | get_summed_hist (self, names) |
| def | get_efficiency (self, signal_names) |
| def | get_true_positives (self, signal_names) |
| def | get_false_positives (self, bckgrd_names) |
| def | get_purity (self, signal_names, bckgrd_names) |
| def | get_signal_to_noise (self, signal_names, bckgrd_names) |
| def | get_purity_per_bin (self, signal_names, bckgrd_names) |
Public Attributes | |
| bins | |
| create histogram | |
| bin_centers | |
| bin centers | |
| bin_widths | |
| Subtract a small number from the bin width, otherwise the errorband plot is unstable. | |
| hists | |
| initialize empty dictionary for histograms | |
Static Public Attributes | |
| None | hist = None |
| Histogram of the full data. | |
| None | bins = None |
| Binning. | |
| None | bin_centers = None |
| Bin centers. | |
| None | bin_widths = None |
| Bin widths. | |
| None | hists = None |
| Dictionary of histograms for the given masks. | |
Extracts information from a pandas.DataFrame and stores it in a binned format. Therefore the size independent from the size of the pandas.DataFrame. Used by the plotting routines below.
Definition at line 42 of file histogram.py.
| def __init__ | ( | self, | |
| data, | |||
| column, | |||
masks = dict(), |
|||
weight_column = None, |
|||
bins = 100, |
|||
equal_frequency = True, |
|||
range_in_std = None |
|||
| ) |
Creates a common binning of the given column of the given pandas.Dataframe,
and stores for each given mask the histogram of the column
@param data pandas.DataFrame like object containing column and weight_column
@param column string identifiying the column in the pandas.DataFrame which is binned.
@param masks dictionary of names and boolean arrays, which select the data
used for the creation of histograms with these names
@param weight_column identifiying the column in the pandas.DataFrame which is used as weight
@param bins use given bins instead of default 100
@param equal_frequency perform an equal_frequency binning
@param range_in_std show only the data in a windows around +- range_in_std * standard_deviation around the mean
Definition at line 61 of file histogram.py.
| def get_efficiency | ( | self, | |
| signal_names | |||
| ) |
Return the cumulative efficiency in each bin of the sum of the histograms with the given names. @param signal_names of the histograms @return numpy.array with hist data, numpy.array with corresponding binomial errors
Definition at line 125 of file histogram.py.
| def get_false_positives | ( | self, | |
| bckgrd_names | |||
| ) |
Return the cumulative false positives in each bin of the sum of the histograms with the given names. @param names names of the histograms @return numpy.array with hist data, numpy.array with corresponding binomial errors
Definition at line 152 of file histogram.py.
| def get_hist | ( | self, | |
name = None |
|||
| ) |
Return histogram with the given name. If none returns histogram of the full data. @param name name of the histogram @return numpy.array with hist data, numpy.array with corresponding poisson errors
Definition at line 104 of file histogram.py.
| def get_purity | ( | self, | |
| signal_names, | |||
| bckgrd_names | |||
| ) |
Return the cumulative purity in each bin of the sum of the histograms with the given names. @param names names of the histograms @return numpy.array with hist data, numpy.array with corresponding binomial errors
Definition at line 163 of file histogram.py.
| def get_purity_per_bin | ( | self, | |
| signal_names, | |||
| bckgrd_names | |||
| ) |
Return the purity in each bin of the sum of the histograms with the given names. @param names names of the histograms @return numpy.array with hist data, numpy.array with corresponding binomial errors
Definition at line 193 of file histogram.py.
| def get_signal_to_noise | ( | self, | |
| signal_names, | |||
| bckgrd_names | |||
| ) |
Return the cumulative signal to noise ratio in each bin of the sum of the histograms with the given names. @param names names of the histograms @return numpy.array with hist data, numpy.array with corresponding binomial errors
Definition at line 178 of file histogram.py.
| def get_summed_hist | ( | self, | |
| names | |||
| ) |
Return the sum of histograms with the given names. @param names names of the histograms @return numpy.array with hist data, numpy.array with corresponding poisson errors
Definition at line 114 of file histogram.py.
| def get_true_positives | ( | self, | |
| signal_names | |||
| ) |
Return the cumulative true positives in each bin of the sum of the histograms with the given names. @param names names of the histograms @return numpy.array with hist data, numpy.array with corresponding binomial errors
Definition at line 141 of file histogram.py.
|
static |
Bin centers.
Definition at line 55 of file histogram.py.
| bin_centers |
bin centers
Definition at line 95 of file histogram.py.
|
static |
Bin widths.
Definition at line 57 of file histogram.py.
| bin_widths |
Subtract a small number from the bin width, otherwise the errorband plot is unstable.
Definition at line 97 of file histogram.py.
|
static |
Binning.
Definition at line 53 of file histogram.py.
| bins |
create histogram
Definition at line 92 of file histogram.py.
|
static |
Histogram of the full data.
Definition at line 51 of file histogram.py.
|
static |
Dictionary of histograms for the given masks.
Definition at line 59 of file histogram.py.
| hists |
initialize empty dictionary for histograms
Definition at line 99 of file histogram.py.