Reputation: 13
I’m working with a bike-sharing dataset that tracks trips between stations and I'm wondering if there's a better way to feed the (time series) data into a neural network using PyTorch.
Each record includes:
rent_station
and return_station
(start and end points of a trip)rent_time
and return_time
(the hour when the bike was rented/returned for the trip)count
(number of trips with the same parameters).My goal is to create inflow and outflow matrices for each time slot (e.g., hourly), where:
Then for a given d, I would then feed the matrices from t-d to t-1 into my model. Here's my current approach:
Matrix Representation:
Dataset and Dataloader:
Any advice or code snippets would be greatly appreciated!
Upvotes: 0
Views: 45