0
$\begingroup$

Hello I am a layman trying to analyze game data from League of Legends, specifically looking at predicting the win rate for a given champion given an item build.

Outline

A player can own up to 6 items at the end of a game. They could have purchased these items in different orders or adjusted their inventory position during the course of the game.

In this fashion the dataset may contain the following rows with:

   champion id   |                 items ids               | win(1)/loss(0)
----------------------------------------------------------------------------
       45        |   [3089, 3135, 3151, 3157, 3165, 3285]  |       1
       45        |   [3151, 3285, 3135, 3089, 3157, 3165]  |       1
       45        |   [3165, 3285, 3089, 3135, 3157, 3151]  |       0

While the items are in a different order the build is the same, my initial thought would be to simply multiply the item ids as this would give me an integer value representing that combination of 6 items.

While there are hundreds of items, in reality a champion draws off a small subset (~20) of those to form the core (3 items) of their build. A game may also finish before players have had time to purchase 6 items:

                items ids               
------------------------------------------
   [3089, XXXX, 3151, 3285, 3165, 0000]
   [XXXX, 3285, XXXX, 3165, 3151, 0000]
   [3165, 3285, 3089, XXXX, 0000, 0000]

XXXX item from outside core subset
0000 empty inventory slot

As item 3089 compliments champion 45 core builds that have item 3089 have a higher win rate than core builds which are missing item 3089.

The size of the data set available for each champion varies between 10000 and 100000. The mean is probably around 35000.

Questions

  1. Is this a suitable problem for supervised classification?
  2. How should I approach finding groups of core items and their win rates?
$\endgroup$
3
  • $\begingroup$ How much data do you have? $\endgroup$ Commented Aug 28, 2015 at 12:04
  • $\begingroup$ @gung 10000 - 100000 per champion, the mean is around 35000 $\endgroup$
    – Justin
    Commented Aug 28, 2015 at 12:11
  • $\begingroup$ My current thoughts are that I use unsupervised clustering to find the answer to 2 and then generate a dataset using the raw data and the data from 2 for 1? $\endgroup$
    – Justin
    Commented Aug 28, 2015 at 13:33

1 Answer 1

1
$\begingroup$

Use a logistic regression with a sparse (L1) regularizer. Logistic regression tries to predict the probability of winning given the items purchased:

$$p(\mbox{win}=1|\mathbf x) = \sigma(\mathbf w^\top \mathbf x + b)$$

where $\sigma$ denotes the logistic function.

Sometimes this algorithm is also called generalized linear model with a logit link function and a Bernoulli likelihood (you have to add the regularizer though).

Represent your items as long vectors $\mathbf x$ of 0's and 1's. E.g. if you have 5 items in total, and the hero purchased item 2 and 3, the vector would be

x = [0,1,1,0,0]

This also helps you to deal with missing values, since this representation does not care how many items a hero purchased.

The input dimension will be huge but that should not be a problem because of (a) the regularizer and (b) you have enough training data. Make sure to use proper model selection for the strength of the regularizer, using cross-validation, for instance.

The sparse regularizer will try to push all those entries in your feature vector $\mathbf w$ to zero that are not relevant for predicting the success of the hero. Therefore, your relevant items will be the ones that have non-zero entries in $\mathbf w$. As a rule of thumb: The larger the absolute value of $w_i$ corresponding to an item $i$ is, the more important it is.

I don't know what language you are using. If you are a Pythonista, sklearn has a logistic regression with regularization. However, I am sure that R or Matlab have similar implementations.

Good luck.

$\endgroup$

Your Answer

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.