![]() |
Belle II Software development
|
Public Member Functions | |
| __init__ (self, name="Original", n_bins=None) | |
| fit (self, x, y=None) | |
| __call__ (self, x) | |
| transform (self, x, set_limits=False) | |
| set_n_bins (self, n) | |
| set_limits (self, x) | |
| io (self) | |
Public Attributes | |
| n_bins = n_bins | |
| Binning in x, will be set automatically. | |
| int | max = 0 |
| Maximum of the fitted distribution. | |
| int | min = 0 |
| Minimum of the fitted distribution. | |
| bool | is_processed = False |
| Status flag. | |
| name = name | |
| Name of the class. | |
Protected Member Functions | |
| _initialise (self, x) | |
| _fit (self, x, y=None) | |
| _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.
| __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.
| __call__ | ( | self, | |
| x ) |
Call function calls transform :param x: Input data :return: Transformed data
Definition at line 95 of file transform.py.
|
protected |
This is defined in the children and overwritten. :param x: array x values :param y: class variable [1,0]
Reimplemented in CDF, and ToFlat.
Definition at line 102 of file transform.py.
|
protected |
Sets limits for the data. Not called by the user. :param x: array type
Definition at line 71 of file transform.py.
|
protected |
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 CDF, and ToFlat.
Definition at line 121 of file transform.py.
| 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.
| 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.
| 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.
| 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.
| bool is_processed = False |
Status flag.
Definition at line 64 of file transform.py.
| int max = 0 |
Maximum of the fitted distribution.
Definition at line 58 of file transform.py.
| int min = 0 |
Minimum of the fitted distribution.
Definition at line 61 of file transform.py.
| n_bins = n_bins |
Binning in x, will be set automatically.
Definition at line 55 of file transform.py.
|
inherited |
Name of the class.
Definition at line 46 of file settings.py.