I’m trying to use the fastAI framework to create an RNN modell for the rossmann data (even if it’s said earlier that it gives poor result)
But I’m having trouble getting the dataloader to work properly with the categories together with continuous data. I would like to use the embedding layers for the categorical data and then input all data to an rnn or gru network and finally predict the result
I’ve tried use the “ColumnarModelData.from_data_frame” and set the batchsize to 256 and i reshape the matrix to to (64,4,num_inputs) inside the forwared function. The axis need to be switched for the data get the correct format for the Rnn ( 4, 64, num_inputs).
The problem with this approach is that if the batch size is not evenly divided with 4, it can’t compute. And also i’m not sure if I get the dimensions of the matrix correct to understand how each number is mapped to each other.
Another idea is to stack all data together (ColumnarModelData.from_arrays) , but then I need to manually know the column indexes of categories and columns.
is there an easy way to accomplish this?