I would like to train my XGBoost model using a dictionary as training data, containing 5 keys and each key having windows of an array of data. Here is the figure explaning it:
- I cannot give this data directly to the model (using .fit) because for example 1st label corresponds to the 1st window of each key.
- I tried putting the 1st window of each key in a data frame and give it iteratively to the model but in this case I am having an error like: IndexError: tuple index out of range.
- I tried putting the 1st window of each key in a numpy.ndarray having size of 5 (size of key) but in this case I am having an error like: IndexError: tuple index out of range.
- I tried putting the 1st window of each key in a numpy.ndarray having size of 5 * size of 1st window (I basically concatenated 1st window of each key) but in this case I am having an error like: ValueError: Please reshape the input data into 2-dimensional matrix.. And when I use
a.reshape(a.shape[0], -1),
, I still have an error like: IndexError: tuple index out of range.
I would very much appreciate your help on this issue.
Thank you in advance.