![]() |
Belle II Software
release-08-02-04
|


Public Member Functions | |
| def | __init__ (self, name="Original", n_bins=None) |
| def | fit (self, x, y=None) |
| def | __call__ (self, x) |
| def | transform (self, x, set_limits=False) |
| def | set_n_bins (self, n) |
| def | set_limits (self, x) |
| def | io (self) |
Public Attributes | |
| n_bins | |
| Binning in x, will be set automatically. | |
| max | |
| Maximum of the fitted distribution. | |
| min | |
| Minimum of the fitted distribution. | |
| is_processed | |
| Status flag. | |
| name | |
| Name of the transformation. | |
Private Member Functions | |
| def | _initialise (self, x) |
| def | _fit (self, x, y=None) |
| def | _transform (self, x) |
Base Class for the transformations.
The function _fit() is overwritten by the sub classes.
Attributes
----------
n_bins : int, optional
Binning in x, will be set automatically
max : float
Maximum of the fitted distribution
min : float
Minimum of the fitted distribution
is_processed : bool
Status flag
name : str
Name of the transformation
Definition at line 27 of file transform.py.
| def __init__ | ( | self, | |
name = "Original", |
|||
n_bins = None |
|||
| ) |
Init function :param name: Name :param n_bins: Binning for the transformations
Definition at line 48 of file transform.py.
| def __call__ | ( | self, | |
| x | |||
| ) |
Call function calls transform :param x: Input data :return: Transformed data
Definition at line 95 of file transform.py.
|
private |
This is defined in the children and overwritten. :param x: array x values :param y: class variable [1,0]
Reimplemented in ToFlat, and CDF.
Definition at line 102 of file transform.py.
|
private |
Sets limits for the data. Not called by the user. :param x: array type
Definition at line 71 of file transform.py.
|
private |
This is defined in the children and overwritten. In the base class it does nothing and returns the original distribution. :param x: Distribution to transform, array type :return: Transformed data
Reimplemented in ToFlat, and CDF.
Definition at line 121 of file transform.py.
| def fit | ( | self, | |
| x, | |||
y = None |
|||
| ) |
The fit function is calls the individual _fit() functions. :param x: Distribution to fit, array type :param y: optional for some transformations, sets signal class
Definition at line 84 of file transform.py.
|
inherited |
Logging function :return: logger
Definition at line 49 of file settings.py.
| def set_limits | ( | self, | |
| x | |||
| ) |
Limits the data to the fitted range. :param x: Input data :return: Limited data
Definition at line 139 of file transform.py.
| def set_n_bins | ( | self, | |
| n | |||
| ) |
Calculates the optimal size for the binning. :param n: Length of the input data
Definition at line 131 of file transform.py.
| def transform | ( | self, | |
| x, | |||
set_limits = False |
|||
| ) |
This is defined in the children and overwritten. :param x: Distribution to transform, array type :param set_limits: Limits the range of the data to the fitted range :return: Transformed data
Definition at line 110 of file transform.py.