Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/vipul2001/flight-passenger-prediction-lstm-pytorch
Predicting the number of flight passengers using LSTM in pytorch
https://github.com/vipul2001/flight-passenger-prediction-lstm-pytorch
Last synced: about 6 hours ago
JSON representation
Predicting the number of flight passengers using LSTM in pytorch
- Host: GitHub
- URL: https://github.com/vipul2001/flight-passenger-prediction-lstm-pytorch
- Owner: vipul2001
- Created: 2019-12-28T18:57:30.000Z (almost 5 years ago)
- Default Branch: master
- Last Pushed: 2019-12-28T19:11:10.000Z (almost 5 years ago)
- Last Synced: 2023-12-12T06:26:47.521Z (11 months ago)
- Language: Jupyter Notebook
- Size: 224 KB
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Flight-passenger-prediction-LSTM-pytorch
Predicting the number of flight passengers using LSTM in pytorch.
This repo shows prediction of flight passenger using LSTM model.The Data has been taken from the seaborn library
The repo implements a simple network for it in pytorch :
```pythonclass LSTM(nn.Module):
def __init__(self, input_size=1, hidden_layer_size=100, output_size=1):
super().__init__()
self.hidden_layer_size = hidden_layer_sizeself.lstm = nn.LSTM(input_size, hidden_layer_size)
self.linear = nn.Linear(hidden_layer_size, output_size)
self.hidden_cell = (torch.zeros(1,1,self.hidden_layer_size),
torch.zeros(1,1,self.hidden_layer_size))def forward(self, input_seq):
lstm_out, self.hidden_cell = self.lstm(input_seq.view(len(input_seq) ,1, -1), self.hidden_cell)
predictions = self.linear(lstm_out.view(len(input_seq), -1))
return predictions[-1]
```
## loss function Vs Epoches
![loss](lossvsepoch.png)
## Data distribution across month
![distribution](monthvspass.png)
## Plots for prediction
![](prediction.png)
![](prediction_monthly.png)