A time-series dataset contains observations at successive timepoints. Unlike an ordinary table whose rows can be treated independently, row order matters: an earlier observation may help predict a later one. In hourly bike-sharing data, for example, earlier rain could help predict later rental counts. section 4.4 section 4.4.1
The bike-sharing data starts as one row per hour, with columns for weather, temperature, rental counts, and other variables. To give a neural network fixed-size chunks, group the hours into days. The resulting tensor can have shape N × C × L: days × variables × hours. Keeping variables on the middle axis makes each variable’s 24-hour sequence accessible as a whole. Days × hours × variables is also a valid arrangement. section 4.4.1 section 4.4.2
Turn hourly rows into daily sequences
For 17,520 hourly rows with 17 columns, `bikes.view(-1, 24, bikes.shape[1])` gives a 730 × 24 × 17 tensor. Then `daily_bikes.transpose(1, 2)` gives 730 × 17 × 24: one day, 17 variables, and 24 hourly values along the respective axes. This grouping requires complete, correctly ordered hours; the example file fills hours missing from the original data. section 4.4.2
A day is a useful chunk because daily rhythms may help prediction, but it is not the only choice: complete data could instead be grouped into 168-hour weeks. Before training, categorical weather conditions can be one-hot encoded, and quantitative variables such as temperature can be rescaled or standardized. This prepares the sequences for a model; it does not train one. section 4.4.2 section 4.4.3





















