Skip to content

Commit 1e8bb59

Browse files
committed
commit message
0 parents  commit 1e8bb59

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

48 files changed

+2221
-0
lines changed

.gitignore

+21
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
/.idea/*
2+
/__pycache__/*
3+
.gitignore
4+
/.ipynb_checkpoints/*
5+
/notebook/.ipynb_checkpoints
6+
/backup/*
7+
.DS_Store
8+
MYIDEA.md
9+
/deepts/.DS_Store
10+
/deepts/models/.DS_Store
11+
/examples/.DS_Store
12+
/temp.py
13+
/models/scaler.pkl
14+
/models/saved_model.pb
15+
/models/variables/*
16+
**/__pycache__/
17+
**/.DS_Store
18+
**/.ipynb_checkpoints/
19+
/examples/data/crawer_data.py
20+
/reference/*
21+
/models/*

LICENSE

+21
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
MIT License
2+
3+
Copyright (c) 2020 Longxing Tan
4+
5+
Permission is hereby granted, free of charge, to any person obtaining a copy
6+
of this software and associated documentation files (the "Software"), to deal
7+
in the Software without restriction, including without limitation the rights
8+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9+
copies of the Software, and to permit persons to whom the Software is
10+
furnished to do so, subject to the following conditions:
11+
12+
The above copyright notice and this permission notice shall be included in all
13+
copies or substantial portions of the Software.
14+
15+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21+
SOFTWARE.

README.md

+153
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,153 @@
1+
# Time series prediction
2+
This repo implements the common methods of time series prediction, especially deep learning methods in TensorFlow2.
3+
It's highly welcomed to contribute if you have better idea, just create a PR. If any question, feel free to open an issue.
4+
5+
6+
<table style="width:100%">
7+
<tr>
8+
<th>
9+
<p align="center">
10+
ARIMA
11+
</p>
12+
</th>
13+
<th>
14+
<p align="center">
15+
<a href="./docs/arima.md" name="introduction">intro</a>
16+
</p>
17+
<p align="center">
18+
<a href="./deepts/models/arima.py" name="code">code</a>
19+
</p>
20+
</th>
21+
</tr>
22+
<tr>
23+
<th>
24+
<p align="center">
25+
GBDT
26+
</p>
27+
</th>
28+
<th>
29+
<p align="center">
30+
<a href="./docs/tree.md" name="introduction">intro</a>
31+
</p>
32+
<p align="center">
33+
<a href="./deepts/models/tree.py" name="code">code</a>
34+
</p>
35+
</th>
36+
</tr>
37+
<tr>
38+
<th>
39+
<p align="center">
40+
RNN
41+
</p>
42+
</th>
43+
<th>
44+
<p align="center">
45+
<a href="./docs/rnn.md" name="introduction">intro</a>
46+
</p>
47+
<p align="center">
48+
<a href="./deepts/models/seq2seq.py" name="code">code</a>
49+
</p>
50+
</th>
51+
</tr>
52+
<tr>
53+
<th>
54+
<p align="center">
55+
wavenet
56+
</p>
57+
</th>
58+
<th>
59+
<p align="center">
60+
<a href="./docs/wavenet.md" name="introduction">intro</a>
61+
</p>
62+
<p align="center">
63+
<a href="./deepts/models/wavenet.py" name="code">code</a>
64+
</p>
65+
</th>
66+
</tr>
67+
<tr>
68+
<th>
69+
<p align="center">
70+
transformer
71+
</p>
72+
</th>
73+
<th>
74+
<p align="center">
75+
<a href="./docs/transformer.md" name="introduction">intro</a>
76+
</p>
77+
<p align="center">
78+
<a href="./deepts/models/transformer.py" name="code">code</a>
79+
</p>
80+
</th>
81+
</tr>
82+
<tr>
83+
<th>
84+
<p align="center">
85+
U-Net
86+
</p>
87+
</th>
88+
<th>
89+
<p align="center">
90+
<a href="./docs/unet.md" name="introduction">intro</a>
91+
</p>
92+
<p align="center">
93+
<a href="./deepts/models/unet.py" name="code">code</a>
94+
</p>
95+
</th>
96+
</tr>
97+
<tr>
98+
<th>
99+
<p align="center">
100+
n-beats
101+
</p>
102+
</th>
103+
<th>
104+
<p align="center">
105+
<a href="./docs/nbeats.md" name="introduction">intro</a>
106+
</p>
107+
<p align="center">
108+
<a href="./deepts/models/nbeats.py" name="code">code</a>
109+
</p>
110+
</th>
111+
</tr>
112+
<tr>
113+
<th>
114+
<p align="center">
115+
GAN
116+
</p>
117+
</th>
118+
<th>
119+
<p align="center">
120+
<a href="./docs/gan.md" name="introduction">intro</a>
121+
</p>
122+
<p align="center">
123+
<a href="./deepts/models/gan.py" name="code">code</a>
124+
</p>
125+
</th>
126+
</tr>
127+
</table>
128+
129+
130+
## Usage
131+
1. Install the library
132+
```bash
133+
pip install -r requirements.txt
134+
```
135+
2. Download the data, if necessary
136+
```bash
137+
bash ./data/download_passenger.sh
138+
```
139+
3. Train the model, set `custom_model_params` if you want
140+
```bash
141+
cd examples
142+
python run_train.py --use_model seq2seq
143+
```
144+
4. Predict new data
145+
```bash
146+
python run_test.py
147+
```
148+
149+
## Further reading
150+
https://github.com/awslabs/gluon-ts/
151+
152+
## Contributor
153+
- [LongxingTan](https://longxingtan.github.io/)

data/.gitkeep

Whitespace-only changes.

data/download_passenger.sh

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
#!/bin/sh
2+
# This is a simple script to download air passenger data
3+
wget https://www.kaggle.com/andreazzini/international-airline-passengers/download -O data/international-airline-passengers.zip
+148
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,148 @@
1+
"Month","International airline passengers: monthly totals in thousands. Jan 49 ? Dec 60"
2+
"1949-01",112
3+
"1949-02",118
4+
"1949-03",132
5+
"1949-04",129
6+
"1949-05",121
7+
"1949-06",135
8+
"1949-07",148
9+
"1949-08",148
10+
"1949-09",136
11+
"1949-10",119
12+
"1949-11",104
13+
"1949-12",118
14+
"1950-01",115
15+
"1950-02",126
16+
"1950-03",141
17+
"1950-04",135
18+
"1950-05",125
19+
"1950-06",149
20+
"1950-07",170
21+
"1950-08",170
22+
"1950-09",158
23+
"1950-10",133
24+
"1950-11",114
25+
"1950-12",140
26+
"1951-01",145
27+
"1951-02",150
28+
"1951-03",178
29+
"1951-04",163
30+
"1951-05",172
31+
"1951-06",178
32+
"1951-07",199
33+
"1951-08",199
34+
"1951-09",184
35+
"1951-10",162
36+
"1951-11",146
37+
"1951-12",166
38+
"1952-01",171
39+
"1952-02",180
40+
"1952-03",193
41+
"1952-04",181
42+
"1952-05",183
43+
"1952-06",218
44+
"1952-07",230
45+
"1952-08",242
46+
"1952-09",209
47+
"1952-10",191
48+
"1952-11",172
49+
"1952-12",194
50+
"1953-01",196
51+
"1953-02",196
52+
"1953-03",236
53+
"1953-04",235
54+
"1953-05",229
55+
"1953-06",243
56+
"1953-07",264
57+
"1953-08",272
58+
"1953-09",237
59+
"1953-10",211
60+
"1953-11",180
61+
"1953-12",201
62+
"1954-01",204
63+
"1954-02",188
64+
"1954-03",235
65+
"1954-04",227
66+
"1954-05",234
67+
"1954-06",264
68+
"1954-07",302
69+
"1954-08",293
70+
"1954-09",259
71+
"1954-10",229
72+
"1954-11",203
73+
"1954-12",229
74+
"1955-01",242
75+
"1955-02",233
76+
"1955-03",267
77+
"1955-04",269
78+
"1955-05",270
79+
"1955-06",315
80+
"1955-07",364
81+
"1955-08",347
82+
"1955-09",312
83+
"1955-10",274
84+
"1955-11",237
85+
"1955-12",278
86+
"1956-01",284
87+
"1956-02",277
88+
"1956-03",317
89+
"1956-04",313
90+
"1956-05",318
91+
"1956-06",374
92+
"1956-07",413
93+
"1956-08",405
94+
"1956-09",355
95+
"1956-10",306
96+
"1956-11",271
97+
"1956-12",306
98+
"1957-01",315
99+
"1957-02",301
100+
"1957-03",356
101+
"1957-04",348
102+
"1957-05",355
103+
"1957-06",422
104+
"1957-07",465
105+
"1957-08",467
106+
"1957-09",404
107+
"1957-10",347
108+
"1957-11",305
109+
"1957-12",336
110+
"1958-01",340
111+
"1958-02",318
112+
"1958-03",362
113+
"1958-04",348
114+
"1958-05",363
115+
"1958-06",435
116+
"1958-07",491
117+
"1958-08",505
118+
"1958-09",404
119+
"1958-10",359
120+
"1958-11",310
121+
"1958-12",337
122+
"1959-01",360
123+
"1959-02",342
124+
"1959-03",406
125+
"1959-04",396
126+
"1959-05",420
127+
"1959-06",472
128+
"1959-07",548
129+
"1959-08",559
130+
"1959-09",463
131+
"1959-10",407
132+
"1959-11",362
133+
"1959-12",405
134+
"1960-01",417
135+
"1960-02",391
136+
"1960-03",419
137+
"1960-04",461
138+
"1960-05",472
139+
"1960-06",535
140+
"1960-07",622
141+
"1960-08",606
142+
"1960-09",508
143+
"1960-10",461
144+
"1960-11",390
145+
"1960-12",432
146+
147+
International airline passengers: monthly totals in thousands. Jan 49 ? Dec 60
148+

deepts/__init__.py

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
# encoding=utf-8

0 commit comments

Comments
 (0)