PythonTsa 1.4.8__tar.gz → 1.5.0__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of PythonTsa might be problematic. Click here for more details.
- {PythonTsa-1.4.8 → pythontsa-1.5.0}/PKG-INFO +11 -2
- {PythonTsa-1.4.8 → pythontsa-1.5.0}/setup.py +5 -5
- {PythonTsa-1.4.8 → pythontsa-1.5.0}/src/PythonTsa/TsTensor.py +7 -7
- pythontsa-1.5.0/src/PythonTsa/__init__.py +1 -0
- {PythonTsa-1.4.8 → pythontsa-1.5.0}/src/PythonTsa.egg-info/PKG-INFO +11 -2
- PythonTsa-1.4.8/src/PythonTsa/__init__.py +0 -1
- {PythonTsa-1.4.8 → pythontsa-1.5.0}/README.md +0 -0
- {PythonTsa-1.4.8 → pythontsa-1.5.0}/pyproject.toml +0 -0
- {PythonTsa-1.4.8 → pythontsa-1.5.0}/setup.cfg +0 -0
- {PythonTsa-1.4.8 → pythontsa-1.5.0}/src/PythonTsa/CheckStationarynInvertible.py +0 -0
- {PythonTsa-1.4.8 → pythontsa-1.5.0}/src/PythonTsa/CointegrationTest.py +0 -0
- {PythonTsa-1.4.8 → pythontsa-1.5.0}/src/PythonTsa/LjungBoxtest.py +0 -0
- {PythonTsa-1.4.8 → pythontsa-1.5.0}/src/PythonTsa/ModResidDiag.py +0 -0
- {PythonTsa-1.4.8 → pythontsa-1.5.0}/src/PythonTsa/MultiCorrPvalue.py +0 -0
- {PythonTsa-1.4.8 → pythontsa-1.5.0}/src/PythonTsa/Ptsadata/AntidiabeticDrugSales.csv +0 -0
- {PythonTsa-1.4.8 → pythontsa-1.5.0}/src/PythonTsa/Ptsadata/AustraliaEmployedTotalPersons.xlsx +0 -0
- {PythonTsa-1.4.8 → pythontsa-1.5.0}/src/PythonTsa/Ptsadata/AustraliaUnemployedTotalPersons.xlsx +0 -0
- {PythonTsa-1.4.8 → pythontsa-1.5.0}/src/PythonTsa/Ptsadata/BitcoinPrice17-6-23-18-6-22.xlsx +0 -0
- {PythonTsa-1.4.8 → pythontsa-1.5.0}/src/PythonTsa/Ptsadata/DAX.csv +0 -0
- {PythonTsa-1.4.8 → pythontsa-1.5.0}/src/PythonTsa/Ptsadata/DAXlogret.csv +0 -0
- {PythonTsa-1.4.8 → pythontsa-1.5.0}/src/PythonTsa/Ptsadata/EconGermany.dat +0 -0
- {PythonTsa-1.4.8 → pythontsa-1.5.0}/src/PythonTsa/Ptsadata/ExchRate NZ per UK.txt +0 -0
- {PythonTsa-1.4.8 → pythontsa-1.5.0}/src/PythonTsa/Ptsadata/Global mean surface air temp changes 1880-1985.csv +0 -0
- {PythonTsa-1.4.8 → pythontsa-1.5.0}/src/PythonTsa/Ptsadata/GlobalTemperature.txt +0 -0
- {PythonTsa-1.4.8 → pythontsa-1.5.0}/src/PythonTsa/Ptsadata/IBM.csv +0 -0
- {PythonTsa-1.4.8 → pythontsa-1.5.0}/src/PythonTsa/Ptsadata/Noboyngirl.csv +0 -0
- {PythonTsa-1.4.8 → pythontsa-1.5.0}/src/PythonTsa/Ptsadata/RwalkwDrift0.3.csv +0 -0
- {PythonTsa-1.4.8 → pythontsa-1.5.0}/src/PythonTsa/Ptsadata/SP500dailyreturns.csv +0 -0
- {PythonTsa-1.4.8 → pythontsa-1.5.0}/src/PythonTsa/Ptsadata/Southtemperature.txt +0 -0
- {PythonTsa-1.4.8 → pythontsa-1.5.0}/src/PythonTsa/Ptsadata/USEconomicChange.csv +0 -0
- {PythonTsa-1.4.8 → pythontsa-1.5.0}/src/PythonTsa/Ptsadata/USFemalesAged20+Job1948-81.csv +0 -0
- {PythonTsa-1.4.8 → pythontsa-1.5.0}/src/PythonTsa/Ptsadata/USQgdpunemp.csv +0 -0
- {PythonTsa-1.4.8 → pythontsa-1.5.0}/src/PythonTsa/Ptsadata/USbill.csv +0 -0
- {PythonTsa-1.4.8 → pythontsa-1.5.0}/src/PythonTsa/Ptsadata/USmacronInRate.txt +0 -0
- {PythonTsa-1.4.8 → pythontsa-1.5.0}/src/PythonTsa/Ptsadata/WTI-Brent.csv +0 -0
- {PythonTsa-1.4.8 → pythontsa-1.5.0}/src/PythonTsa/Ptsadata/Yearly mean total sunspot number 1700 - 2017.csv +0 -0
- {PythonTsa-1.4.8 → pythontsa-1.5.0}/src/PythonTsa/Ptsadata/areturns.csv +0 -0
- {PythonTsa-1.4.8 → pythontsa-1.5.0}/src/PythonTsa/Ptsadata/chaos.csv +0 -0
- {PythonTsa-1.4.8 → pythontsa-1.5.0}/src/PythonTsa/Ptsadata/dlGDPukcaus1q1980.csv +0 -0
- {PythonTsa-1.4.8 → pythontsa-1.5.0}/src/PythonTsa/Ptsadata/elec-temp.csv +0 -0
- {PythonTsa-1.4.8 → pythontsa-1.5.0}/src/PythonTsa/Ptsadata/gdpquarterlychina1992.1-2017.4.csv +0 -0
- {PythonTsa-1.4.8 → pythontsa-1.5.0}/src/PythonTsa/Ptsadata/h02July1991June2008.csv +0 -0
- {PythonTsa-1.4.8 → pythontsa-1.5.0}/src/PythonTsa/Ptsadata/ibmlogret.csv +0 -0
- {PythonTsa-1.4.8 → pythontsa-1.5.0}/src/PythonTsa/Ptsadata/milk.xlsx +0 -0
- {PythonTsa-1.4.8 → pythontsa-1.5.0}/src/PythonTsa/Ptsadata/monthly returns of PG stock 1961 to 2016.csv +0 -0
- {PythonTsa-1.4.8 → pythontsa-1.5.0}/src/PythonTsa/Ptsadata/monthly returns of Procter n Gamble stock n 3 market indexes 1961 to 2016.csv +0 -0
- {PythonTsa-1.4.8 → pythontsa-1.5.0}/src/PythonTsa/Ptsadata/nao.csv +0 -0
- {PythonTsa-1.4.8 → pythontsa-1.5.0}/src/PythonTsa/Ptsadata/realGdpConsInv.csv +0 -0
- {PythonTsa-1.4.8 → pythontsa-1.5.0}/src/PythonTsa/Ptsadata/us-q-rgdp.csv +0 -0
- {PythonTsa-1.4.8 → pythontsa-1.5.0}/src/PythonTsa/Ptsadata/usFOI.csv +0 -0
- {PythonTsa-1.4.8 → pythontsa-1.5.0}/src/PythonTsa/Ptsadata/usGDPnotAdjust.csv +0 -0
- {PythonTsa-1.4.8 → pythontsa-1.5.0}/src/PythonTsa/RandomWalk.py +0 -0
- {PythonTsa-1.4.8 → pythontsa-1.5.0}/src/PythonTsa/SeasonalRW.py +0 -0
- {PythonTsa-1.4.8 → pythontsa-1.5.0}/src/PythonTsa/Selecting_arma.py +0 -0
- {PythonTsa-1.4.8 → pythontsa-1.5.0}/src/PythonTsa/Selecting_arma2.py +0 -0
- {PythonTsa-1.4.8 → pythontsa-1.5.0}/src/PythonTsa/SimulSBM.py +0 -0
- {PythonTsa-1.4.8 → pythontsa-1.5.0}/src/PythonTsa/True_acf.py +0 -0
- {PythonTsa-1.4.8 → pythontsa-1.5.0}/src/PythonTsa/datadir.py +0 -0
- {PythonTsa-1.4.8 → pythontsa-1.5.0}/src/PythonTsa/plot_acf_pacf.py +0 -0
- {PythonTsa-1.4.8 → pythontsa-1.5.0}/src/PythonTsa/plot_multi_ACF.py +0 -0
- {PythonTsa-1.4.8 → pythontsa-1.5.0}/src/PythonTsa/plot_multi_Q_pvalue.py +0 -0
- {PythonTsa-1.4.8 → pythontsa-1.5.0}/src/PythonTsa.egg-info/SOURCES.txt +0 -0
- {PythonTsa-1.4.8 → pythontsa-1.5.0}/src/PythonTsa.egg-info/dependency_links.txt +0 -0
- {PythonTsa-1.4.8 → pythontsa-1.5.0}/src/PythonTsa.egg-info/top_level.txt +0 -0
|
@@ -1,7 +1,8 @@
|
|
|
1
|
-
Metadata-Version: 2.
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
2
|
Name: PythonTsa
|
|
3
|
-
Version: 1.
|
|
3
|
+
Version: 1.5.0
|
|
4
4
|
Summary: Package for Applied Time Series Analysis and Forecasting with Python, Springer 2022
|
|
5
|
+
Home-page: https://github.com/QuantLet/pyTSA
|
|
5
6
|
Author: Changquan Huang
|
|
6
7
|
Author-email: h.changquan@icloud.com
|
|
7
8
|
Classifier: Programming Language :: Python :: 3
|
|
@@ -9,6 +10,14 @@ Classifier: License :: OSI Approved :: MIT License
|
|
|
9
10
|
Classifier: Operating System :: OS Independent
|
|
10
11
|
Requires-Python: >=3.6
|
|
11
12
|
Description-Content-Type: text/markdown
|
|
13
|
+
Dynamic: author
|
|
14
|
+
Dynamic: author-email
|
|
15
|
+
Dynamic: classifier
|
|
16
|
+
Dynamic: description
|
|
17
|
+
Dynamic: description-content-type
|
|
18
|
+
Dynamic: home-page
|
|
19
|
+
Dynamic: requires-python
|
|
20
|
+
Dynamic: summary
|
|
12
21
|
|
|
13
22
|
This package is a companion to the book Applied Time Series Analysis and Forecasting with Python, Springer 2022. It contains several
|
|
14
23
|
important Python functions for analyzing time series and most data sets analyzed in the book. Naturally, these functions can also be used to analyze other time series data.
|
|
@@ -4,14 +4,14 @@ with open("README.md", "r", encoding="utf-8") as fh:
|
|
|
4
4
|
long_description = fh.read()
|
|
5
5
|
|
|
6
6
|
setuptools.setup(
|
|
7
|
-
name="PythonTsa",
|
|
8
|
-
version="1.
|
|
9
|
-
author="Changquan Huang",
|
|
7
|
+
name ="PythonTsa",
|
|
8
|
+
version ="1.5.0",
|
|
9
|
+
author ="Changquan Huang",
|
|
10
10
|
author_email="h.changquan@icloud.com",
|
|
11
|
-
description="Package for Applied Time Series Analysis and Forecasting with Python, Springer 2022",
|
|
11
|
+
description ="Package for Applied Time Series Analysis and Forecasting with Python, Springer 2022",
|
|
12
12
|
long_description=long_description,
|
|
13
13
|
long_description_content_type="text/markdown",
|
|
14
|
-
|
|
14
|
+
url = "https://github.com/QuantLet/pyTSA",
|
|
15
15
|
classifiers=[
|
|
16
16
|
"Programming Language :: Python :: 3",
|
|
17
17
|
"License :: OSI Approved :: MIT License",
|
|
@@ -8,10 +8,10 @@ import numpy as np
|
|
|
8
8
|
import pandas as pd
|
|
9
9
|
import requests
|
|
10
10
|
|
|
11
|
-
def create_evaluation_df(predictions, test_inputs,
|
|
11
|
+
def create_evaluation_df(predictions, test_inputs, h, scaler):
|
|
12
12
|
"""Create a data frame for easy evaluation"""
|
|
13
13
|
eval_df = pd.DataFrame(
|
|
14
|
-
predictions, columns=["t+" + str(t) for t in range(1,
|
|
14
|
+
predictions, columns=["t+" + str(t) for t in range(1, h + 1)]
|
|
15
15
|
)
|
|
16
16
|
eval_df["timestamp"] = test_inputs.dataframe.index
|
|
17
17
|
eval_df = pd.melt(
|
|
@@ -42,22 +42,22 @@ class tstensor(UserDict):
|
|
|
42
42
|
{ 'tensor_name' : (range(max_backward_shift, max_forward_shift), [feature, feature, ...] ) }
|
|
43
43
|
if features are non-sequential and should not be shifted, use the form
|
|
44
44
|
{ 'tensor_name' : (None, [feature, feature, ...])}
|
|
45
|
-
- **freq**: time series frequency (default '
|
|
45
|
+
- **freq**: time series frequency (default 'h' - hourly)
|
|
46
46
|
- **drop_incomplete**: (Boolean) whether to drop incomplete samples (default True)
|
|
47
47
|
"""
|
|
48
48
|
|
|
49
49
|
def __init__(
|
|
50
|
-
self, dataset, target,
|
|
50
|
+
self, dataset, target, h, tensor_structure, freq="h", drop_incomplete=True
|
|
51
51
|
):
|
|
52
52
|
self.dataset = dataset
|
|
53
53
|
self.target = target
|
|
54
54
|
self.tensor_structure = tensor_structure
|
|
55
55
|
self.tensor_names = list(tensor_structure.keys())
|
|
56
56
|
|
|
57
|
-
self.dataframe = self._shift_data(
|
|
57
|
+
self.dataframe = self._shift_data(h, freq, drop_incomplete)
|
|
58
58
|
self.data = self._df2tensors(self.dataframe)
|
|
59
59
|
|
|
60
|
-
def _shift_data(self,
|
|
60
|
+
def _shift_data(self, h, freq, drop_incomplete):
|
|
61
61
|
|
|
62
62
|
# Use the tensor_structures definitions to shift the features in the original dataset.
|
|
63
63
|
# The result is a Pandas dataframe with multi-index columns in the hierarchy
|
|
@@ -68,7 +68,7 @@ class tstensor(UserDict):
|
|
|
68
68
|
df = self.dataset.copy()
|
|
69
69
|
|
|
70
70
|
idx_tuples = []
|
|
71
|
-
for t in range(1,
|
|
71
|
+
for t in range(1, h + 1):
|
|
72
72
|
df["t+" + str(t)] = df[self.target].shift(t * -1, freq=freq)
|
|
73
73
|
idx_tuples.append(("target", "y", "t+" + str(t)))
|
|
74
74
|
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
__version__ = "1.5.0"
|
|
@@ -1,7 +1,8 @@
|
|
|
1
|
-
Metadata-Version: 2.
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
2
|
Name: PythonTsa
|
|
3
|
-
Version: 1.
|
|
3
|
+
Version: 1.5.0
|
|
4
4
|
Summary: Package for Applied Time Series Analysis and Forecasting with Python, Springer 2022
|
|
5
|
+
Home-page: https://github.com/QuantLet/pyTSA
|
|
5
6
|
Author: Changquan Huang
|
|
6
7
|
Author-email: h.changquan@icloud.com
|
|
7
8
|
Classifier: Programming Language :: Python :: 3
|
|
@@ -9,6 +10,14 @@ Classifier: License :: OSI Approved :: MIT License
|
|
|
9
10
|
Classifier: Operating System :: OS Independent
|
|
10
11
|
Requires-Python: >=3.6
|
|
11
12
|
Description-Content-Type: text/markdown
|
|
13
|
+
Dynamic: author
|
|
14
|
+
Dynamic: author-email
|
|
15
|
+
Dynamic: classifier
|
|
16
|
+
Dynamic: description
|
|
17
|
+
Dynamic: description-content-type
|
|
18
|
+
Dynamic: home-page
|
|
19
|
+
Dynamic: requires-python
|
|
20
|
+
Dynamic: summary
|
|
12
21
|
|
|
13
22
|
This package is a companion to the book Applied Time Series Analysis and Forecasting with Python, Springer 2022. It contains several
|
|
14
23
|
important Python functions for analyzing time series and most data sets analyzed in the book. Naturally, these functions can also be used to analyze other time series data.
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
__version__ = "1.4.8"
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{PythonTsa-1.4.8 → pythontsa-1.5.0}/src/PythonTsa/Ptsadata/AustraliaEmployedTotalPersons.xlsx
RENAMED
|
File without changes
|
{PythonTsa-1.4.8 → pythontsa-1.5.0}/src/PythonTsa/Ptsadata/AustraliaUnemployedTotalPersons.xlsx
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{PythonTsa-1.4.8 → pythontsa-1.5.0}/src/PythonTsa/Ptsadata/gdpquarterlychina1992.1-2017.4.csv
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|