3
$\begingroup$

I'm using scikit learn, if that's relevant. I'm still at the data collection stage, so I'm trying to figure out how to design my features to be useful.

I have an obstacle course where 5 teams (out of 25) compete at a time. Each team has a set of numerical stats assigned to them, such as overall strength, speed, teamwork, which may change from run to run (e.g. if a member suffers an injury/gets sick). For the purpose of the problem, a team is considered as a single unit (we don't care about the individual members, as their individual stats are already accounted for in the team stat).

Now, each obstacle course run is one row of my training data, and I want to predict the winning team based on their stats.

The problem is, I'm not sure how to turn the stats into features, or how to make predictions based on the competing teams for a certain run.

For example, I could do this...

Run# | Team | Str | Spd | Tmwk | Winner
 352 |  05  |  46 |  59 |  33  |   14
 352 |  14  |  88 |  15 |  49  |   14
 352 |  02  |  63 |  52 |  63  |   14
...and so on, for a total of 5 teams per run

but then it doesn't adhere to one training example per row. I was thinking to have something more like...

Run# |  (TeamA_Stats)   |  (TeamB_Stats)   |  (TeamC_Stats)   | ... | Winner
 352 | (05, 46, 59, 33) | (14, 88, 15, 49) | (02, 63, 52, 63) | ... | 14
 353 | (07, 71, 50, 15) | (05, 45, 55, 36) | (23, 11, 88, 66) | ... | 23

...but I'm not sure if that's even possible for scikit-learn to handle.

I feel like I'm approaching this the wrong way. How do I design the dataset so that I can include the stats of each team, but have it predict the single winning team of the run?

$\endgroup$
  • $\begingroup$ looks like your input data are 2D (4x14). Maybe a CNN would be appropriate? $\endgroup$ – Mohammad Athar Mar 7 '17 at 20:05
1
$\begingroup$

Is there a reason why you don't want to train the data in a more general way just to predict the probability of winning given Str, Spd Tmwk?

So this would be:

Str | Spd | Tmwk | Win
46  |  59 |  33  |   0 (this was team 05)
88  |  15 |  49  |   1 (this was team 14)
63  |  52 |  63  |   0 (this was team 02)

If you want to use the relative level of characteristics instead of just their values, maybe for each run, use the proportion of a teams characteristics to the total sum?

Using simply the Str column as an example:

Str    | Str | Total Str | Win
0.233  |  46 |  197      |   0 (this was team 05)
0.447  |  88 |  197      |   1 (this was team 14)
0.319  |  63 |  197      |   0 (this was team 02)

and you can use this relative index of Str, Spd, and Tmwk to predict the probability of winning in each run. Hope this provide some additional way for structring you data.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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