Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/gcarq/keras-timeseries-prediction
Time series prediction with Sequential Model and LSTM units
https://github.com/gcarq/keras-timeseries-prediction
keras lstm machine-learning prediction regression-models
Last synced: 3 months ago
JSON representation
Time series prediction with Sequential Model and LSTM units
- Host: GitHub
- URL: https://github.com/gcarq/keras-timeseries-prediction
- Owner: gcarq
- License: mit
- Created: 2017-01-18T23:25:39.000Z (about 8 years ago)
- Default Branch: master
- Last Pushed: 2017-01-19T00:29:01.000Z (about 8 years ago)
- Last Synced: 2024-10-14T09:48:59.533Z (3 months ago)
- Topics: keras, lstm, machine-learning, prediction, regression-models
- Language: Python
- Homepage:
- Size: 59.6 KB
- Stars: 120
- Watchers: 10
- Forks: 52
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Time series predictions with Keras
#### Requirements
* Theano
* Keras
* matplotlib
* pandas
* scikit-learn
* tqdm
* numpy#### Usage
```
git clone https://github.com/gcarq/keras-timeseries-prediction.git
cd keras-timeseries-prediction/
pip install -r requirements.txt
python main.py
```#### Dataset
The dataset is `international-airline-passengers.csv` which contains 144 data points ranging from Jan 1949 to Dec 1960.
Each data point represents monthly passengers in thousands.![Dataset](data/dataset.png)
#### Model
```
model = Sequential()
model.add(LSTM(64,
activation='relu',
batch_input_shape=(batch_size, look_back, 1),
stateful=True,
return_sequences=False))
model.add(Dense(1, activation='linear'))
model.compile(loss='mean_squared_error', optimizer='adam')
```#### Results
![Predictions](data/predictions.png)