I was looking at using an LSTM model to forecast the amount of gold gained for each of 10 heroes in a game of Dota 2, a MOBA game, as a base model in some type of model architecture. The game is a 5v5 with a main feature of the game to amass gold. The challenge is how to include categorical feature variables for the hero and a feature variable for the team the hero is a part of into the model.

1. Target Variable: Gold

Here is an example of the data without conforming to the typical 3D forms of TF/Keras and PyTorch:

match_id   team hero_id gold_t
7517376613  radiant 26  [0, 170, 260, 350, 440, 827, 1051, 1141, 1278,...
7517376613  radiant 84  [0, 247, 580, 826, 1235, 1481, 1876, 2279, 265...
7517376613  dire    25  [0, 357, 715, 1130, 1578, 1968, 2261, 2861, 33...
2. Categorical Variable: hero_id & team

I have thousands/hundreds-of-thousands of matches of time-series data for each hero in the game I can train on. Is there a way to incorporate the categorical variable of the hero chosen to develop a model that forecasts specifically for that hero? This seems to be answered by a source I posted at the bottom.

Is there a way to incorporate interactions between the time series as features to predict for each? For instance, if I was to train a model on a time-series forecast for hero_id=26, can the progression of hero_id=25 time-series be treated as a feature while incorporating whether they were on the same team? I understand multi-variate time-series, the question is whether the time-series could be uniquely identified as belonging to hero_id 25 and capture its unique interaction with hero_id=26. I am familiar with using time-lags/multi-variate data as features, but not in combination with a categorical variable.

If no options to include all of these is available, that's fine. There is a route to simplification:

Simplify this to train a different model for each hero_id (lots of processing), using each game as a separate time-series (is that even possible?). After training, each model would need to be called separately per the hero_id.

3. What I've Read Elsewhere (only one thing seemed relevant):

I have referenced and played with two items:

  1. Adding Features To Time Series Model LSTM

  2. https://github.com/philipperemy/cond_rnn/tree/master?tab=readme-ov-file

In summary, it suggests initializing RNN states with a learned representation of the categorical variables. Could this be accomplished with multiple categories?

Even if that is possible, I did not know how to incorporate using separate matches as training data. In most examples I've seen, the time-series is one long instance and treats each time-step as a sample. In my situation the time-series would not last more than 45 steps, but I have access to 100,000+ time-series' of 45 steps. Is there a meaningful way these 100,000+ matches can be used as training data or will the model work perfectly fine on a single time-series?



Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Browse other questions tagged or ask your own question.