PythonTsa 1.4.8__py3-none-any.whl → 1.5.0__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(
@@ -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 'H' - hourly)
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, 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
54
54
  self.tensor_structure = tensor_structure
55
55
  self.tensor_names = list(tensor_structure.keys())
56
56
 
57
- self.dataframe = self._shift_data(H, freq, drop_incomplete)
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
 
PythonTsa/__init__.py CHANGED
@@ -1 +1 @@
1
- __version__ = "1.4.8"
1
+ __version__ = "1.5.0"
@@ -1,7 +1,8 @@
1
- Metadata-Version: 2.1
1
+ Metadata-Version: 2.4
2
2
  Name: PythonTsa
3
- Version: 1.4.8
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.
@@ -9,8 +9,8 @@ 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
13
- PythonTsa/__init__.py,sha256=E4mzTBdhfF_J-eYfpxL9p266GOT21FVqqvr6DARJwNo,23
12
+ PythonTsa/TsTensor.py,sha256=HTBbZ3Od8MIEaR766BCwD4rzjxC6F6DcSv1Sf3iX1EI,4951
13
+ PythonTsa/__init__.py,sha256=-t-JqoY5-Z9a7_h97HwF1F8F2ewGxOpybJsYQi6z7bA,25
14
14
  PythonTsa/datadir.py,sha256=joAY91FulKj62XPM57OiLKF9Zp26Xjy_N3Yqu0YN0q0,344
15
15
  PythonTsa/plot_acf_pacf.py,sha256=K4eW8tFea2M9Ztm39uJqPgubQs_j0BwHg-aYITOaNvs,1762
16
16
  PythonTsa/plot_multi_ACF.py,sha256=P-clInPKu4VouCx72YOHtRiDeVX8S4oULG3VYx1WovM,2407
@@ -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.5.0.dist-info/METADATA,sha256=zpC10dF7BhRwJIjzM9mlkj5xQkXWnz-1Geo__-yseJ8,968
56
+ pythontsa-1.5.0.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
57
+ pythontsa-1.5.0.dist-info/top_level.txt,sha256=iCSWYaQTwlSCwrOInjSrMBYGOGlyU8KHW3el0-Kq1Xs,10
58
+ pythontsa-1.5.0.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