Out-of-the-Box Fitting Functions¶
-
fitting_functions_list.
linear
(x: Union[<sphinx.ext.autodoc.importer._MockObject object at 0x7fb3a80c2050>, float]) → Union[<sphinx.ext.autodoc.importer._MockObject object at 0x7fb3a80c2110>, float]¶ Simple linear fitting function.
param a: Parameters to be fitted type a: np.ndarray param x: Value to be evaluated by the function type x: float or np.ndarray return: evaluation value or values rtype: float or np.ndarray Syntax:
y = a[0] + a[1] * x
Parameters: - a (
numpy.ndarray
) – Coefficients array of length 2 - x (
numpy.ndarray
orfloat
) – Free parameter
Returns: numpy.ndarray
orfloat
- a (
-
fitting_functions_list.
constant
(x: Union[<sphinx.ext.autodoc.importer._MockObject object at 0x7fb3a80c2350>, float]) → Union[<sphinx.ext.autodoc.importer._MockObject object at 0x7fb3a80c2410>, float]¶ Constant fitting function.
param a: Parameters to be fitted type a: np.ndarray param x: Value to be evaluated by the function type x: float or np.ndarray return: evaluation value or values rtype: float or np.ndarray Syntax:
y = a[0]
Parameters: - a (
numpy.ndarray
) – Coefficients array of length 1 - x (
numpy.ndarray
orfloat
) – Free parameter
Returns: numpy.ndarray
orfloat
- a (
-
fitting_functions_list.
parabolic
(x: Union[<sphinx.ext.autodoc.importer._MockObject object at 0x7fb3a80c2650>, float]) → Union[<sphinx.ext.autodoc.importer._MockObject object at 0x7fb3a80c2710>, float]¶ Parabolic fitting function.
param a: Parameters to be fitted type a: np.ndarray param x: Value to be evaluated by the function type x: float or np.ndarray return: evaluation value or values rtype: float or np.ndarray Syntax:
y = a[0] + a[1] * x + a[2] * x ^ 2
Parameters: - a (
numpy.ndarray
) – Coefficients array of length 3 - x (
numpy.ndarray
orfloat
) – Free parameter
Returns: numpy.ndarray
orfloat
- a (
-
fitting_functions_list.
straight_power
(x: Union[<sphinx.ext.autodoc.importer._MockObject object at 0x7fb3a80c2950>, float]) → Union[<sphinx.ext.autodoc.importer._MockObject object at 0x7fb3a80c2a10>, float]¶ Represent fitting of y ~ x^n.
param a: Parameters to be fitted type a: np.ndarray param x: Value to be evaluated by the function type x: float or np.ndarray return: evaluation value or values rtype: float or np.ndarray Syntax:
y = a[0] * (x + a[1]) ^ a[2] + a[3]
Parameters: - a (
numpy.ndarray
) – Coefficients array of length 4 - x (
numpy.ndarray
orfloat
) – Free parameter
Returns: numpy.ndarray
orfloat
- a (
-
fitting_functions_list.
inverse_power
(x: Union[<sphinx.ext.autodoc.importer._MockObject object at 0x7fb3a80c2c50>, float]) → Union[<sphinx.ext.autodoc.importer._MockObject object at 0x7fb3a80c2d10>, float]¶ Represent fitting of y ~ x^(-n).
param a: Parameters to be fitted type a: np.ndarray param x: Value to be evaluated by the function type x: float or np.ndarray return: evaluation value or values rtype: float or np.ndarray Syntax:
y = a[0] / (x + a[1]) ^ a[2] + a[3]
Parameters: - a (
numpy.ndarray
) – Coefficients array of length 4 - x (
numpy.ndarray
orfloat
) – Free parameter
Returns: numpy.ndarray
orfloat
- a (
-
fitting_functions_list.
polynomial
() → eddington.fitting_function_class.FittingFunction¶ Creates a polynomial fitting function with parameters as coefficients.
Parameters: n (int) – Degree of the polynomial. Returns: a polynomial fitting function Return type: FittingFunction Raises: FittingFunctionLoadError – Raised when trying to load a polynomial with negative degree.
-
fitting_functions_list.
hyperbolic
(x: Union[<sphinx.ext.autodoc.importer._MockObject object at 0x7fb3a80c2f50>, float]) → Union[<sphinx.ext.autodoc.importer._MockObject object at 0x7fb3a80c8050>, float]¶ Hyperbolic fitting function.
param a: Parameters to be fitted type a: np.ndarray param x: Value to be evaluated by the function type x: float or np.ndarray return: evaluation value or values rtype: float or np.ndarray Syntax:
y = a[0] / (x + a[1]) + a[2]
Parameters: - a (
numpy.ndarray
) – Coefficients array of length 3 - x (
numpy.ndarray
orfloat
) – Free parameter
Returns: numpy.ndarray
orfloat
- a (
-
fitting_functions_list.
exponential
(x: Union[<sphinx.ext.autodoc.importer._MockObject object at 0x7fb3a80c8290>, float]) → Union[<sphinx.ext.autodoc.importer._MockObject object at 0x7fb3a80c8350>, float]¶ Exponential fitting function.
param a: Parameters to be fitted type a: np.ndarray param x: Value to be evaluated by the function type x: float or np.ndarray return: evaluation value or values rtype: float or np.ndarray Syntax:
y = a[0] * exp(a[1] * x) + a[2]
Parameters: - a (
numpy.ndarray
) – Coefficients array of length 3 - x (
numpy.ndarray
orfloat
) – Free parameter
Returns: numpy.ndarray
orfloat
- a (
-
fitting_functions_list.
sin
(x: Union[<sphinx.ext.autodoc.importer._MockObject object at 0x7fb3a80c8890>, float]) → Union[<sphinx.ext.autodoc.importer._MockObject object at 0x7fb3a80c8950>, float]¶ Sine fitting function.
param a: Parameters to be fitted type a: np.ndarray param x: Value to be evaluated by the function type x: float or np.ndarray return: evaluation value or values rtype: float or np.ndarray Syntax:
y = a[0] * sin(a[1] * x + a[2]) + a[3]
Parameters: - a (
numpy.ndarray
) – Coefficients array of length 4 - x (
numpy.ndarray
orfloat
) – Free parameter
Returns: numpy.ndarray
orfloat
- a (
-
fitting_functions_list.
cos
(x: Union[<sphinx.ext.autodoc.importer._MockObject object at 0x7fb3a80c8590>, float]) → Union[<sphinx.ext.autodoc.importer._MockObject object at 0x7fb3a80c8650>, float]¶ Cosines fitting function.
param a: Parameters to be fitted type a: np.ndarray param x: Value to be evaluated by the function type x: float or np.ndarray return: evaluation value or values rtype: float or np.ndarray Syntax:
y = a[0] * cos(a[1] * x + a[2]) + a[3]
Parameters: - a (
numpy.ndarray
) – Coefficients array of length 4 - x (
numpy.ndarray
orfloat
) – Free parameter
Returns: numpy.ndarray
orfloat
- a (
-
fitting_functions_list.
normal
(x: Union[<sphinx.ext.autodoc.importer._MockObject object at 0x7fb3a80c8b90>, float]) → Union[<sphinx.ext.autodoc.importer._MockObject object at 0x7fb3a80c8c50>, float]¶ Normal distribution fitting function.
param a: Parameters to be fitted type a: np.ndarray param x: Value to be evaluated by the function type x: float or np.ndarray return: evaluation value or values rtype: float or np.ndarray Syntax:
y = a[0] * exp( - ((x - a[1]) / a[2]) ^ 2) + a[3]
Parameters: - a (
numpy.ndarray
) – Coefficients array of length 4 - x (
numpy.ndarray
orfloat
) – Free parameter
Returns: numpy.ndarray
orfloat
- a (
-
fitting_functions_list.
poisson
(x: Union[<sphinx.ext.autodoc.importer._MockObject object at 0x7fb3a80c8e90>, float]) → Union[<sphinx.ext.autodoc.importer._MockObject object at 0x7fb3a80c8f50>, float]¶ Poisson fitting function.
param a: Parameters to be fitted type a: np.ndarray param x: Value to be evaluated by the function type x: float or np.ndarray return: evaluation value or values rtype: float or np.ndarray Syntax:
y = a[0] * (a[1] ^ x) * exp(-a[1]) / gamma(x+1) + a[2]
Parameters: - a (
numpy.ndarray
) – Coefficients array of length 3 - x (
numpy.ndarray
orfloat
) – Free parameter
Returns: numpy.ndarray
orfloat
- a (