Click4Ai

508.

Hard

Implement a Temporal Convolutional Network (TCN) to forecast a time series. The model should take in a sequence of historical values and output the next value in the sequence. **Example:** Given a sequence of daily temperatures [23, 21, 22, 24, 25], the model should output the next temperature value. **Constraints:** Use a single TCN layer with a kernel size of 3, and a dilation rate of 2. The model should be trained on a dataset of 1000 time steps.

Test Cases

Test Case 1
Input: [[23, 21, 22, 24, 25]]
Expected: [[25.5]]
Test Case 2
Input: [[10, 12, 11, 13, 14]]
Expected: [[14.5]]
+ 3 hidden test cases