0
$\begingroup$

I have a large quantity of game data that I am trying to perform prediction with. The goal is to identify whether certain card groupings have advantages when played against opposing hands. As part of my approach (because there are large combinations of selected cards), it is useful to perform segmentation into common groupings.

My question relates to the symmetry of information since both the "home" and "away" player are gravitating to common card segment groupings. Here is an illustration of the dataset:

Home_segment     Away_segment     Outcome
2                4                0
3                1                1
7                1                0
4                2                1
1                3                0
...
n rows
...
3                6                1
1                7                0

As constructed, you'll note that segment 4 appears to have an advantage over segment 2, and if the pattern continued through the data, this would be a useful insight.

My question, however, is that in creating a predictor using "home" and "away" in this format, the information contained by the "reverse perspectives" appears to be discarded. That is, when segment 4 becomes the home segment, and 2 is the away segment, it seems to me that the prior relationship is not considered in the modelling solution.

Should I effective "double" my dataset by reversing the home / away positions? Do I introduce independence issues by doing so? Interested in perspectives and how I can most effectively model using a dataset with this construct.

$\endgroup$
4
  • $\begingroup$ What is the model that you apply to this? $\endgroup$ Commented Feb 18, 2022 at 13:36
  • $\begingroup$ I'm using a format: y = exp(b + xi[home] + yi[away] +zi[home*away]) $\endgroup$
    – C. Cooney
    Commented Feb 18, 2022 at 14:08
  • $\begingroup$ What do these xi, yi, zi mean? What is y? $\endgroup$ Commented Feb 18, 2022 at 14:34
  • $\begingroup$ It's a logistic regression. So the xi, yi, zi are the parameters of interest to be fit. Y is outcome. The segments are one-hot encoded (hence why a scalar is converted into multiple columns). $\endgroup$
    – C. Cooney
    Commented Feb 18, 2022 at 15:12

3 Answers 3

1
+100
$\begingroup$

The first thing to note is that the logistic regression model you describe in your comments has more parameters ($n^2 + 2n$) than there are segment combinations ($n^2$), meaning that it is overparametrized and therefore will just give you the observed frequency of wins for each possible combination.

If that is what you are interested in, you don't really need to perform logistic regression - simply count the number of wins for each combination and treat it as a standard binomial estimation problem (with $k$ wins for a given segment out of $m$ games). This way you can deal with symmetry by considering reversed positions as the same combination - just count for example (4,2) and (2,4) together, so you have in total $n(n+1)/2$ combinations instead of $n^2$, and you get a estimated win probability for each.

$\endgroup$
0
$\begingroup$

First of all, doubling the data with reverse home and away positions just destroys all the information this feature. I'll explain:

Say you have for example 3 cases where 4 beats 2 when 4 is away (3:0), and 7 examples where 2 beats 4 when 4 is home (0:7). those are two interesting points you learn from the data. now let's double it and reverse:

the score now is (3:7) when 4 is away and (3:7) when 4 is home.

Instead, it's simpler just to drop the home/away column altogether and work with the data you have twice as fast, with exactly the same result.

What I would do is use an association rule mining algorithm that starts with hand combination pairs, finds the significant ones with just the hand pair data, and then check if the home/away is significant as the second level.

this will require you to manipulate the data into a different format, as you need to work with counts to mine the rules.

https://en.wikipedia.org/wiki/Association_rule_learning

$\endgroup$
0
$\begingroup$

Imagine there would be no home or away. Then the probability to win would only depend on the particular combination where 4 vs 2 and 2 vs 4 are equal situations (just the players who have the segments are inversed).

In that case you would not need to model win probabilities for all $n^2$ combinations of segment-combinations, but only for $(n+1)n/2$ combinations.


How does it change when there is a difference between home and away?

How you want to add the aspect of the home vs away situation is not up to the statistician to decide for you. You need to come up with the relevant relationships and models yourself.

There are different options. In a logistic regression like yours,

  • You might add a variable for whether the team is home or away and add it to the linear equation (like a bonus that increases the probability to win when playing home, or equivalently a penalty that decreases the probability to win when playing away).

  • Or you could have a more refined model where there is an interaction between home/away and specific combinations of segments.

Obviously duplicating the data by adding a copy while switching home and away is eliminating any information about home and away due to the symmetry in the data.

One thing that you could do is remove the home/away columns and add it as a dummy variable. And the segment columns should be ordered such that symmetric combinations do not occur (such that there are only $(n-1)n/2$ cases instead of $n^2$)

Segment   Segment    Home/Away   Outcome
player 1  player 2
4         2          0           0
3         1          1           1
7         1          1           0
4         2          1           1
3         1          0           0
...
n rows
...
6         3          1           1
7         1          1           0

So here the segment of player 1 is always larger than the segment of player 2, such that there are no $n^2$ combinations.

Whether you want to do something in the model with the 'home/away' variable is up to you.

$\endgroup$
1
  • $\begingroup$ There is no "home advantage". So it is simply a way to categorize the fact that the cards have opposing force and contribute to the gameplay result. $\endgroup$
    – C. Cooney
    Commented Feb 18, 2022 at 16:04

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.