tests#

Statistical tests to check model results.

Contains diagnostic tests to check if model residuals/noise do not contain significant autocorrelation and are normally distributed, using hypothesis testing.

Examples

Run diagnostic tests on model after optimization:

ml.stats.diagnostics()

Functions#

durbin_watson(→ float)

Durbin-Watson test for autocorrelation.

ljung_box(→ tuple[float, float])

Ljung-box test for autocorrelation.

runs_test(→ tuple[float, float])

Runs test for autocorrelation.

stoffer_toloi(→ tuple[float, float])

Adapted Ljung-Box test to deal with missing data [Rcb3cfb20bb89-stoffer_1992].

diagnostics(, float_fmt)

Methods to compute various diagnostics checks for a time series.