iaf.fit.models
Implementation of simple models.
-
iaf.fit.models.exponential_model(x: ndarray, a: float, b: float)[source]
Exponential model y_hat = a * exp(b * x).
- Parameters:
x (np.ndarray) – Independent variable.
a (float) – Scaling parameter of the exponential a * exp(b * x).
b (float) – Scaling parameter of independent variable in the exponential a * exp(b * x).
- Returns:
y_hat – Predicted y values.
- Return type:
np.ndarray
-
iaf.fit.models.linear_model(x: ndarray, a: float, b: float)[source]
Linear model y_hat = a * x + b.
- Parameters:
x (np.ndarray) – Independent variable.
a (float) – Slope of the line ax + b.
b (float) – Intercept of the line ax + b.
- Returns:
y_hat – Predicted y values.
- Return type:
np.ndarray
-
iaf.fit.models.logarithmic_model(x: ndarray, a: float, b: float)[source]
Logarithmic model y_hat = a + b * ln(x).
- Parameters:
x (np.ndarray) – Independent variable.
a (float) – Intercept value of the logarithmic model a + b * ln(x).
b (float) – Scaling parameter of independent variable in the logarithmic model a + b * ln(x).
- Returns:
y_hat – Predicted y values.
- Return type:
np.ndarray
-
iaf.fit.models.square_root_model(x: ndarray, a: float, b: float)[source]
Square root model y_hat = a + b * sqrt(x).
- Parameters:
x (np.ndarray) – Independent variable.
a (float) – Intercept value of the square root model a + b * sqrt(x).
b (float) – Scaling parameter of independent variable in the square root model a + b * sqrt(x).
- Returns:
y_hat – Predicted y values.
- Return type:
np.ndarray