Using a dictionary of multidimensional data for training

249 views Asked by At

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: enter image description here

  1. I cannot give this data directly to the model (using .fit) because for example 1st label corresponds to the 1st window of each key.
  2. 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.
  3. 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.
  4. 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.

0

There are 0 answers