# How can I predict rank of a team based on list of team members and past placement?

I just started with ML, so this could potentially be a pretty stupid question, plz forgive me.

Here's the gist of the problem:

I have a list in json format like this:

[
{
// Final rank of the team after all the matches are done
"rank": 7,
// List of team members
"characters": [
{ "char_id": "my_char_1", "level": 2, "item_ids": [1, 2, 3] }
...
]
}
]

I want to predict the rank for a given "team" of characters without looking at the competitors. Basically, I want to go from this:

[
{ "char_id": "my_char_1", "level": 2, "item_ids": [1, 2, 3]  }
...
]

to a single output neuron with a value from 1 to 100.

I parsed the source data into the first json structure, but I'm currently stuck at trying to give Tensorflow pairs of data (team + past rank), ideally in the form of two arrays where elements at a given index belong together.

TLDR:

Assuming this is possible at all (and not a lack of information or something), how do I feed Tensorflow this example data (list of team members -> past rank) properly to predict the future rank of a completely new team?

I've found this question which is somewhat similar: Predicting outcome of MOBA team games

Based on this answer, I'm assuming I'll have to normalize the data, so instead of an array I would need a map like this:

{
"my_char_1": null,
"my_char_2": {
"level": 2,
"item_ids": {
"1": true,
"2": false,
"3": true
...
}
},
...
}

However, I struggle with the act of passing the data itself, not so much how to prepare the json structure. Basically, take whatever json structure would be optimal and assume it already exists.

• How many 'observations' do you have? To 'train' a model to predict this kind of thing you will need a have a fair bit of data that's reasonably balanced. Dec 27 '20 at 5:38
• How many of such data points do I need realistically? The output actually only goes from 1-10 (not 1-100) and I can easily get 1000s if not 10000s of team->rank data points. The number of unique characters is ~70. Level goes from 1-5, around ~50 items. Items aren't randomly distributed, items are better/worse depending on the character they're equipped to. Dec 27 '20 at 14:28
• Oh and one more thing: Level is currently a number from 1-5, but in reality a level 5 is much stronger than 5 level 1 versions. Should I normalize this data into a new "strength" value that calculates the actual strength? Dec 27 '20 at 14:36
• It's hard to say exactly how much data you'll need. The more data the better - get as much as you possibly can. You don't have to normalise the 'level' variable either. Just treat it as a categorical variable first, then use it as a numeric variable; see which gives the best out of sample performance. Based on what you're tying to achieve I think you should consider an ordered logistic regression model. Dec 27 '20 at 19:45

• One approach to dealing with multiple characters (and even items) could be to 'count' them. As a simple example, imagine you have 3 unique characters (A, B and C) and two items (P and Q). Say you pick character A twice and C once, plus item Q twice. Then you'd have the input vector $x = (A,B,C,P,Q)=(2,0,1,0,2)$. Also, is the 'normalisation' process you describe done by the game or by you? If this number represents the effectiveness of the character and item combination, this could also work. Dec 31 '20 at 0:19