Module iaf.fit.models
Implementation of simple models.
Functions
def exponential_model(x: numpy.ndarray, a: float, b: float)-
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:np.ndarray- Predicted
yvalues.
def linear_model(x: numpy.ndarray, a: float, b: float)-
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:np.ndarray- Predicted
yvalues.
def logarithmic_model(x: numpy.ndarray, a: float, b: float)-
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:np.ndarray- Predicted
yvalues.
def square_root_model(x: numpy.ndarray, a: float, b: float)-
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:np.ndarray- Predicted
yvalues.