Bins¶
quantflow.utils.bins.pdf
¶
Extract a probability density function from the data as a DataFrame
with index given by the bin centers and a single column pdf with the
estimated probability density function values
| PARAMETER | DESCRIPTION |
|---|---|
data
|
The data to extract the PDF from
TYPE:
|
num_bins
|
The number of bins to use in the histogram. if not provided it is calculated from the
TYPE:
|
delta
|
The spacing between bins, if not provided it is calculated from the
TYPE:
|
symmetric
|
If provided, the bins are centered around this value
TYPE:
|
precision
|
The precision to use in the calculation
TYPE:
|
Source code in quantflow/utils/bins.py
quantflow.utils.bins.event_density
¶
Calculate the probability density of the number of events in the dataframe columns
| PARAMETER | DESCRIPTION |
|---|---|
df
|
The dataframe to extract the event density from
TYPE:
|
columns
|
The columns to calculate the event density for
TYPE:
|
num
|
The number of events to consider
TYPE:
|