smooth documentation
Classes
|
ADAM: Augmented Dynamic Adaptive Model for Time Series Forecasting. |
|
Exponential Smoothing in Single Source of Error (SSOE) state space model. |
ADAM Methods
|
Fit the ADAM model to time series data. |
|
Generate point forecasts using the fitted ADAM model. |
|
Generate prediction intervals using the fitted ADAM model. |
Select the best model based on information criteria and update model parameters. |
|
|
Generate a formatted summary of the fitted model. |
ES Methods
|
Fit the ADAM model to time series data. |
|
Generate point forecasts using the fitted ADAM model. |
|
Generate prediction intervals using the fitted ADAM model. |
Select the best model based on information criteria and update model parameters. |
|
|
Generate a formatted summary of the fitted model. |
Utility Functions
msdecompose - Multiple seasonal decomposition for time series
lowess - LOWESS (Locally Weighted Scatterplot Smoothing)
Optimization Settings
The ADAM and ES classes use the NLopt library for parameter optimization. You can
customize the optimization behavior via the nlopt_kargs parameter:
from smooth import ADAM
model = ADAM(
model="AAN",
nlopt_kargs={
"print_level": 1, # Print optimization progress
"xtol_rel": 1e-8, # Relative parameter tolerance
"algorithm": "NLOPT_LN_SBPLX" # Use Subplex algorithm
}
)
model.fit(y)
Available parameters:
Parameter |
Description |
Default |
|---|---|---|
print_level |
Verbosity level. When >0, prints B and CF on every iteration. |
0 |
xtol_rel |
Relative tolerance on parameters. Stops when changes < xtol_rel * |params|. |
1e-6 |
xtol_abs |
Absolute tolerance on parameters. Stops when changes < xtol_abs. |
1e-8 |
ftol_rel |
Relative tolerance on cost function. Stops when changes < ftol_rel * |CF|. |
1e-8 |
ftol_abs |
Absolute tolerance on cost function. Stops when changes < ftol_abs. |
0 |
algorithm |
NLopt algorithm name. Use “LN_” prefix for derivative-free. Options: NLOPT_LN_NELDERMEAD, NLOPT_LN_SBPLX, NLOPT_LN_COBYLA, NLOPT_LN_BOBYQA. |
NLOPT_LN_NELDERMEAD |