Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

check_stats on time series differences. #1655

Closed
ngupta23 opened this issue Oct 6, 2021 · 2 comments · Fixed by #2100
Closed

check_stats on time series differences. #1655

ngupta23 opened this issue Oct 6, 2021 · 2 comments · Fixed by #2100
Assignees
Labels
enhancement New feature or request plot_model time_series Topics related to the time series

Comments

@ngupta23
Copy link
Collaborator

ngupta23 commented Oct 6, 2021

Related to #1654

Once this is implemented, add option to run ACF, PACF and Spectral Density and White Noise tests on the differences.

Interface: TBD

# Shows all mentioned differences together with original.
# Trellis with ACF and PACF below the time series in individual rows
plot_model(plot="diff", data_kwargs={'order':[1,2], 'acf': True, 'pacf" True})  

So the above example would have a 3x3 plot

  • Row 1: Time Series Plots for [Original, 1st difference, 2nd difference]
  • Row 2: ACF for [Original, 1st difference, 2nd difference]
  • Row 3: PACF for [Original, 1st difference, 2nd difference]

Other options that could be supported are Spectral Density, FFT, etc. (TBD)

Here is an example, though it is not in the right format. The reason for showing this is to demonstrate its usefulness. It clearly shows that we need to perform the first difference and then either the value of 'p' is 50 or else seasonality is 50.

image

@ngupta23 ngupta23 added enhancement New feature or request time_series Topics related to the time series labels Oct 6, 2021
@ngupta23 ngupta23 added this to the Time Series Gamma Release milestone Oct 6, 2021
@ngupta23 ngupta23 self-assigned this Oct 6, 2021
@ngupta23 ngupta23 added this to To do in Time Series Forecasting via automation Oct 6, 2021
@ngupta23
Copy link
Collaborator Author

ngupta23 commented Dec 18, 2021

Actually, thinking about this more, the purpose of evaluation would not be to replicate the plotting (#1654), but to do additional tests on the differences for example, run LJung-Box, ADF test, etc. on differences. Hence, this functionality should be limited to check_stats method.

Interface TBD

@ngupta23 ngupta23 changed the title Evaluation of time series differences. check_stats on time series differences. Dec 18, 2021
@ngupta23 ngupta23 linked a pull request Jan 29, 2022 that will close this issue
13 tasks
ngupta23 added a commit that referenced this issue Jan 31, 2022
@ngupta23
Copy link
Collaborator Author

To Test

import pandas as pd
from pycaret.datasets import get_data
from pycaret.internal.pycaret_experiment import TimeSeriesExperiment

data = get_data("airline")

exp = TimeSeriesExperiment()
exp.setup(data=data, fh=12, session_id=42)

# Runs tests on original dataset as well as lagged versions 
# Note order = 2 = lags = [1, 1] (same as d=2 in ARIMA)
exp.check_stats(test=test, data_kwargs={"order_list": [1, 2]})
exp.check_stats(test=test, data_kwargs={"lags_list": [1, [1, 12]]})

model = exp.create_model(arima)
# Runs tests on model residuals as well as lagged versions of the residuals
exp.check_stats(model, test=test, data_kwargs={"order_list": [1, 2]})
exp.check_stats(model, test=test, data_kwargs={"lags_list": [1, [1, 12]]})

Time Series Forecasting automation moved this from To do to Done Jan 31, 2022
@github-actions github-actions bot locked as resolved and limited conversation to collaborators May 4, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
enhancement New feature or request plot_model time_series Topics related to the time series
Development

Successfully merging a pull request may close this issue.

1 participant