I don't get them ether, they definitely are putting a ton of stats into some database to calculate them. Maybe it takes all the stats they gather over the game. GPM, XPPM, Item Choices and who each team has, Kills, Deaths, Assists, damage done to heroes and to whom, healing done, crowed control used (Maybe they can even tell if you use some CC badly, like stunning tide hunter when there are other people around), damage taken, damage done to towers, and good old win/loss. Then maybe use some calculations based on the perceived roll of the character should be, and give some metrics a higher weight then others (Deaths likely have less weight on CM then Dragon Knight, buying wards likely has more weight on Witch Doctor then Sven)
I have had games where I have won as 7/0/6 and Necrolyte and my bar barely moved, games where I won and actually went down in rank, and games where we got rolled and I did what I believe is horrible as a character, yet I am ranked as being decent at the character. So winning and loosing has little to do with Hero Performance.