PythonTsa 1.4.8__py3-none-any.whl → 1.4.9__py3-none-any.whl

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/TsTensor.py CHANGED
@@ -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, H, scaler):
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, H + 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(
@@ -47,7 +47,7 @@ class tstensor(UserDict):
47
47
  """
48
48
 
49
49
  def __init__(
50
- self, dataset, target, H, tensor_structure, freq="H", drop_incomplete=True
50
+ self, dataset, target, h, tensor_structure, freq="h", drop_incomplete=True
51
51
  ):
52
52
  self.dataset = dataset
53
53
  self.target = target
@@ -57,7 +57,7 @@ class tstensor(UserDict):
57
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, H, freq, drop_incomplete):
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, H + 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
 
@@ -1,6 +1,6 @@
1
- Metadata-Version: 2.1
1
+ Metadata-Version: 2.4
2
2
  Name: PythonTsa
3
- Version: 1.4.8
3
+ Version: 1.4.9
4
4
  Summary: Package for Applied Time Series Analysis and Forecasting with Python, Springer 2022
5
5
  Author: Changquan Huang
6
6
  Author-email: h.changquan@icloud.com
@@ -9,6 +9,13 @@ Classifier: License :: OSI Approved :: MIT License
9
9
  Classifier: Operating System :: OS Independent
10
10
  Requires-Python: >=3.6
11
11
  Description-Content-Type: text/markdown
12
+ Dynamic: author
13
+ Dynamic: author-email
14
+ Dynamic: classifier
15
+ Dynamic: description
16
+ Dynamic: description-content-type
17
+ Dynamic: requires-python
18
+ Dynamic: summary
12
19
 
13
20
  This package is a companion to the book Applied Time Series Analysis and Forecasting with Python, Springer 2022. It contains several
14
21
  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.
@@ -9,7 +9,7 @@ PythonTsa/Selecting_arma.py,sha256=wuhYx8oWpaBQ2bRbpzFq6d6ZlaB-LY7ckMERrprqftE,3
9
9
  PythonTsa/Selecting_arma2.py,sha256=x33yavKr5jE3nBoF8LhSWXoj-lM6_OvsIiqoS-k5qNA,3472
10
10
  PythonTsa/SimulSBM.py,sha256=hOkp5RaAepGiSKxEi0b_ttcN3pE0qQYcIYS20SWb_F8,696
11
11
  PythonTsa/True_acf.py,sha256=mH3WVoCSOF_8FeCw9ZVbak0VMmYR7RnwrWGAaCUm5zw,1266
12
- PythonTsa/TsTensor.py,sha256=w-Lhw8sZb-lWQ0ZFBE1Q9AU0m5LCz8KENG8TrQYdPLM,4951
12
+ PythonTsa/TsTensor.py,sha256=EIBISKBf2VPY93iLjIeejIp4yW3j0ix23x3Zu7r4DEQ,4951
13
13
  PythonTsa/__init__.py,sha256=E4mzTBdhfF_J-eYfpxL9p266GOT21FVqqvr6DARJwNo,23
14
14
  PythonTsa/datadir.py,sha256=joAY91FulKj62XPM57OiLKF9Zp26Xjy_N3Yqu0YN0q0,344
15
15
  PythonTsa/plot_acf_pacf.py,sha256=K4eW8tFea2M9Ztm39uJqPgubQs_j0BwHg-aYITOaNvs,1762
@@ -52,7 +52,7 @@ PythonTsa/Ptsadata/realGdpConsInv.csv,sha256=IxKMRypOpBlnTPzgI9ITMJxVAJ32y5auKTC
52
52
  PythonTsa/Ptsadata/us-q-rgdp.csv,sha256=NL30qZ5lkdIR3HLhqZbwh9yxzHO1E21t6nf0uVgH4zA,6055
53
53
  PythonTsa/Ptsadata/usFOI.csv,sha256=byZRSPnk599eqWnuo-2lONvO_nnLE-z2J9KyaG_Kn-w,8492
54
54
  PythonTsa/Ptsadata/usGDPnotAdjust.csv,sha256=LVX8mmEDZoQ35dHSgG0L6NchXFUu9LO770nUiKRljwg,6114
55
- PythonTsa-1.4.8.dist-info/METADATA,sha256=DpFwjjpT4ApWpqUZ0hCALmoKvIEPjYeL3CMgehHmC_Q,740
56
- PythonTsa-1.4.8.dist-info/WHEEL,sha256=Xo9-1PvkuimrydujYJAjF7pCkriuXBpUPEjma1nZyJ0,92
57
- PythonTsa-1.4.8.dist-info/top_level.txt,sha256=iCSWYaQTwlSCwrOInjSrMBYGOGlyU8KHW3el0-Kq1Xs,10
58
- PythonTsa-1.4.8.dist-info/RECORD,,
55
+ pythontsa-1.4.9.dist-info/METADATA,sha256=nbxq9oqu71Rxm0sKGtohUuxXewhfOJp2R8gak9gfPwg,902
56
+ pythontsa-1.4.9.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
57
+ pythontsa-1.4.9.dist-info/top_level.txt,sha256=iCSWYaQTwlSCwrOInjSrMBYGOGlyU8KHW3el0-Kq1Xs,10
58
+ pythontsa-1.4.9.dist-info/RECORD,,
@@ -1,5 +1,5 @@
1
1
  Wheel-Version: 1.0
2
- Generator: bdist_wheel (0.41.3)
2
+ Generator: setuptools (80.9.0)
3
3
  Root-Is-Purelib: true
4
4
  Tag: py3-none-any
5
5