Firstly, apologies if this question is obvious, I am new to Time Series Forecasting & ML in general.
I have an application whereby I collect prices from betting exchanges on an interval. This data is fed to a db to be stored and, on an interval, I train my Time Series model on this data. Once I get the data initially, I manually encode it using 1/0 vector. For example:
Soccer [1, 0, 0] Basketball [0, 1, 0] Golf [0, 0, 1]
There are 3 variables of this type:
I am following this tutorial which utilises VAR in TS Forecasting. However, the dataset shown is not using categorical variables so I am at a loss here.
Once I read my data into a dataframe & drop the timestamp, I am left with the following data structure:
dtypes of the dataframe are:
When I try & invoke statsmodel's
VAR with my training data, I get the error:
ValueError: Pandas data cast to numpy dtype of object. Check input data with np.asarray(data).
From a lengthy Google, it looks as though the best way to deal with this is via converting to string then int(?):
To me, this seems a bit redundant as isn't that defeating the whole point of dummy encoding?
How should I go about handling this data & feeding it into an Auto Regression model?
Also, as I'm pretty new to ML, could you please let me know if I am on the correct track or not with my model choice? I attempted types of Linear Regression but this data (once plotted on a graph) will follow a similar stationarity to that of a stock market plot.
Thanks in advance :)