Table 2 Architecture of the LSTM network used for short-term weather prediction in SWADS.
Layer no. | Layer type | Units / neurons | Activation function | Output shape | Remarks |
|---|---|---|---|---|---|
1 | Input (Sequence Input) | 4 features (Temperature, Humidity, Wind Speed, Precipitation) | - | 20 × 4 | 20-time steps (sequence length = 20) |
2 | LSTM Layer 1 | 64 units | tanh (internal), sigmoid (gates) | 20 × 64 | Captures temporal dependencies |
3 | LSTM Layer 2 | 32 units | tanh (internal), sigmoid (gates) | 32 | Refines feature dynamics |
4 | Fully Connected Layer | 16 neurons | ReLU | 16 | Feature compression before classification |
5 | Dropout Layer | - | - | - | Dropout rate = 0.2 to prevent overfitting |
6 | Output Layer | 1 neuron | Sigmoid | 1 | Predicts binary weather status (clear / adverse) |