Skip to main content

Learning my per-matchup MMR in Starcraft II through PyMC3

In this post we'll continue our SC2 replay research, started last time. You may want to go back to that and pick up on the terminology!

To recap: we used replay data from my SC2 games over 2019 to estimate a "true MMR" value and infer the size of per-game fluctuations. This time, we'll redo that analysis, except to get something more useful: we'll look at the three matchups I played and infer separate MMR values for each of those. Let's dig into it!

I'll redo the basic data cleaning steps here. If any of this is confusing, reviewing the previous post might really be a good idea - or you could ask a question below, as always!

If you take a close look, you might also find a teaser for one of the next posts in this series here :)

In [42]:
import pandas as pd
import altair

def MMR_winrate(diff):
    return 1 / (1 + 10**(-diff/880))

df = pd.read_csv("https://raw.githubusercontent.com/StanczakDominik/stanczakdominik.github.io/src/files/replays.csv", index_col=0)
df['time_played_at'] = pd.to_datetime(df.time_played_at)
df = df.sort_values('time_played_at')
for column in ['race', 'enemy_race', 'map_name']:
    df[column] = pd.Categorical(df[column])
df['enemy_mmr'] = df['mmr'] - df['mmr_diff']
df['expected_winrate'] = MMR_winrate(df.mmr_diff)
all_data = df[(df.mmr > 0) & (df.enemy_mmr > 0) & (df.race == "Protoss") & (df.duration > 10)]
all_data = all_data.rename({"enemy_nickame": "enemy_nickname"}, axis=1) # whoops
data = all_data[(all_data['time_played_at'] > '2019-01-01') & (all_data['time_played_at'] < '2020-01-01')]
data
Out[42]:
time_played_at win race enemy_race mmr mmr_diff enemy_nickname map_name duration enemy_mmr expected_winrate
8 2019-10-06 12:36:36+00:00 True Protoss Protoss 3826 78 vasea World of Sleepers LE 743 3748 0.550847
325 2019-10-08 19:33:28+00:00 False Protoss Protoss 3893 -53 Wavelength Ephemeron LE 254 3946 0.465386
54 2019-10-10 07:41:27+00:00 False Protoss Zerg 3828 26 PereiRa Winter's Gate LE 45 3802 0.517001
346 2019-10-10 07:55:19+00:00 True Protoss Zerg 3760 -56 &lt;PROOO&gt;<sp/>Jesperpro Thunderbird LE 801 3816 0.463433
138 2019-10-10 20:42:11+00:00 True Protoss Protoss 3827 126 Pippuri Acropolis LE 697 3701 0.581684
... ... ... ... ... ... ... ... ... ... ... ...
391 2019-12-27 20:24:27+00:00 False Protoss Zerg 3933 -100 HiveMind World of Sleepers LE 262 4033 0.434956
25 2019-12-27 20:40:39+00:00 True Protoss Zerg 3914 0 Racin Nightshade LE 911 3914 0.500000
208 2019-12-27 21:24:06+00:00 True Protoss Terran 3936 -41 &lt;DemuCl&gt;<sp/>Jazzz Nightshade LE 1277 3977 0.473206
59 2019-12-28 20:58:25+00:00 True Protoss Terran 3959 22 rOoSter Simulacrum LE 76 3937 0.514387
364 2019-12-28 21:06:48+00:00 True Protoss Zerg 3980 -260 contremaitre Nightshade LE 478 4240 0.336192

138 rows × 11 columns

Let's visualize the games on a per-matchup MMR vs enemy MMR basis. I added some fancy Altair selection magic, so you can look at winrates in specific MMR ranges.

In [15]:
brush = altair.selection(type='interval')
scatter = altair.Chart(data).mark_circle().encode(
    altair.X('enemy_mmr',
             scale=altair.Scale(zero=False)),
    altair.Y('mmr',
             scale=altair.Scale(zero=False)),
    facet='enemy_race',
    size='expected_winrate',
    color='win',
    tooltip='enemy_nickname',
).add_selection(brush)

bar = altair.Chart(data).mark_bar().encode(
    x=altair.X('mean(win):Q', scale=altair.Scale(domain=(0, 1))),
    y='enemy_race:O',
).transform_filter(brush)

scatter & bar
Out[15]:

Separate matchup MMRs

This is where the magic starts. Where, before, we had a single MMR estimation, we'll now have three, one for each matchup: $$\mu^n \sim \text{Normal}(4000, 300) \text{ for } n \text{ in } \{1, 2, 3\}$$

And likewise for the fluctuation value: $$\sigma^n \sim \text{HalfNormal}(100)$$

And that, honestly, is about it! When I realized it, I wanted to title this post "How Can It Be That Simple, Like, What The Hell". But I did have to tinker with the model for a good while to find out the optimal way of doing things. It turns out the first idea I had was optimal. Who knew.

We'll use some fancy new PyMC3 3.9 and ArviZ 0.8.3 functionality to replace the old shapes arguments with dims, for cleaner code.

Note: to reproduce, use the GitHub master release of ArviZ for now.

In [18]:
import pymc3 as pm
import arviz as az

# fancy new functionality for xarray output - I'll explain later!
coords = {
    "replay": data.index,
    "race": ["Terran", "Protoss", "Zerg"],
}

We now assign the new priors for $\mu^n$ and $\sigma^n$, three of each - and then we'll add a helper variable for each of the replays. Note how the new syntax is a good bit cleaner than hardcoding the shapes in.

In [19]:
with pm.Model(coords=coords) as split_model:
    mmr_μ_matchup = pm.Normal('μ', 4000, 300, dims='race')
    mmr_σ_matchup = pm.HalfNormal('σ', 100, dims='race')
    mmr_σ_norm = pm.Normal('helper', 0, 1, dims='replay')

And the next change we have to make is indexing the per-race average and fluctuation values based on the enemy races, so that each game in our dataset gets the MMR for its particular matchup.

We'll have to assign a numerical index for each possible enemy race. We'll choose zeroes for Terran and two for Zerg, so that, at least in indices, Protoss can be number one.

In [20]:
race_encoding ={"Terran": 0,
                "Protoss": 1,
                "Zerg": 2} 

with split_model:
    enemy_races = pm.Data("enemy_race", data.enemy_race.map(race_encoding).astype(int), dims='replay')
    mmr = pm.Deterministic('MMR', mmr_μ_matchup[enemy_races] + mmr_σ_matchup[enemy_races] * mmr_σ_norm, dims='replay')

And now it's smooth sailing from here on out! I forgot to add it last time, but PyMC3 can create a neat graph for your model using GraphViz. If I had remembered to do so, the only difference between this model and ours would be the 3 for $\mu, \sigma$ - since we now have three of each - and adding the enemy_race as pymc3.Data.

In [21]:
with split_model:
    enemy_mmr = pm.Data("enemy_mmr", data.enemy_mmr, dims='replay')
    diffs = pm.Deterministic('MMR_diff', mmr - enemy_mmr, dims = 'replay')
    p = pm.Deterministic('winrate', MMR_winrate(diffs), dims = 'replay')
    wl = pm.Bernoulli('win', p=p, observed=data.win, dims = 'replay')
pm.model_to_graphviz(split_model)
Out[21]:
cluster3 3cluster138 138μ μ~NormalMMR MMR~Deterministicμ->MMR σ σ~HalfNormalσ->MMR MMR_diff MMR_diff~DeterministicMMR->MMR_diff enemy_mmr enemy_mmr~Dataenemy_mmr->MMR_diff helper helper~Normalhelper->MMR enemy_race enemy_race~Dataenemy_race->MMR win win~Bernoulliwinrate winrate~Deterministicwinrate->win MMR_diff->winrate

First run

And now, let's sample! We'll add a predictive prior and posterior sample: this lets us easily see what sort of data we'd see from our initial assumptions and from the fully "learned" ("taught"?) model.

In [28]:
predictive_var_names = "win μ σ winrate".split()
with split_model:
    trace = pm.sample(2000, tune=2000, chains=4, random_seed=1)
    output = az.from_pymc3(trace=trace,
                           prior=pm.sample_prior_predictive(2000 , var_names=predictive_var_names, random_seed=1),
                           posterior_predictive=pm.sample_posterior_predictive(trace, var_names=predictive_var_names, random_seed=1),
                          )
output
Auto-assigning NUTS sampler...
Initializing NUTS using jitter+adapt_diag...
Multiprocess sampling (4 chains in 2 jobs)
NUTS: [helper, σ, μ]
100.00% [16000/16000 00:17<00:00 Sampling 4 chains, 7 divergences]
Sampling 4 chains for 2_000 tune and 2_000 draw iterations (8_000 + 8_000 draws total) took 18 seconds.
There were 4 divergences after tuning. Increase `target_accept` or reparameterize.
There were 3 divergences after tuning. Increase `target_accept` or reparameterize.
100.00% [8000/8000 00:07<00:00]
Out[28]:
arviz.InferenceData
    • Show/Hide data repr Show/Hide attributes
      xarray.Dataset
        • chain: 4
        • draw: 2000
        • race: 3
        • replay: 138
        • chain
          (chain)
          int64
          0 1 2 3
          array([0, 1, 2, 3])
        • draw
          (draw)
          int64
          0 1 2 3 4 ... 1996 1997 1998 1999
          array([   0,    1,    2, ..., 1997, 1998, 1999])
        • race
          (race)
          <U7
          'Terran' 'Protoss' 'Zerg'
          array(['Terran', 'Protoss', 'Zerg'], dtype='<U7')
        • replay
          (replay)
          int64
          8 325 54 346 138 ... 25 208 59 364
          array([  8, 325,  54, 346, 138, 405,  20, 129, 104,  46, 302, 408, 101, 219,
                 316, 126,  98, 231, 241, 385, 193, 198,  90, 329, 137, 200,  80, 355,
                 317,  33,  64, 213, 368,  49, 435, 134, 254, 330,  60,  39, 218, 109,
                 301, 133, 328, 181, 156, 395,  43, 249,  27, 153, 211, 420, 366, 186,
                 163,  63, 202,  45,  69,  31, 167, 177,  95, 151, 392, 387,  18, 286,
                 102, 290, 195, 428, 403,  97, 406, 412, 374, 263, 371,  41, 212,  52,
                 238, 345,   4, 117, 407,  56, 103, 118, 319,  57, 128, 294,  15, 273,
                 327, 281, 378, 121, 113, 284, 422, 389, 216,  58, 418, 309, 123, 116,
                 222, 122,  11, 361, 179, 255, 239, 225, 381, 424, 343, 287, 341, 184,
                 380, 196, 174, 306, 252, 148, 416, 391,  25, 208,  59, 364])
        • μ
          (chain, draw, race)
          float64
          4.303e+03 3.375e+03 ... 3.955e+03
          array([[[4302.79553938, 3375.01011989, 4048.86315149],
                  [4323.86457361, 3295.74222841, 3954.05048638],
                  [4239.6739907 , 3448.28894514, 4235.71022401],
                  ...,
                  [4250.95500899, 3592.96680679, 3907.78214913],
                  [4321.36051851, 3657.60296464, 4041.53244852],
                  [4378.58347689, 3680.20202035, 4041.44904971]],
          
                 [[4141.06331072, 3385.94471985, 4135.36324411],
                  [4138.80737046, 3670.4073407 , 4045.58916728],
                  [4194.72695819, 3676.40161761, 3931.11602939],
                  ...,
                  [4066.10358294, 3429.85753425, 4004.41005399],
                  [4049.09082588, 3382.29455772, 3954.15834981],
                  [4422.29348522, 3549.2372973 , 4066.31337586]],
          
                 [[4212.20435522, 3476.71136441, 4104.05998443],
                  [4139.66832504, 3371.93545224, 4198.27086105],
                  [4369.19834033, 3797.3129873 , 3828.50248262],
                  ...,
                  [4320.92217993, 3755.9095065 , 4165.54070368],
                  [4231.08308098, 3713.65002654, 3964.55758405],
                  [4274.41509776, 3407.86141075, 3931.29076179]],
          
                 [[4314.0372303 , 3573.73152574, 4058.10772914],
                  [4114.59770596, 3463.36390945, 4018.74209014],
                  [4464.57525582, 3705.14913054, 4089.96639073],
                  ...,
                  [4504.44403668, 3638.42652115, 3911.16769539],
                  [4256.83526394, 3886.43065114, 3954.52402571],
                  [4256.83526394, 3886.43065114, 3954.52402571]]])
        • helper
          (chain, draw, replay)
          float64
          0.7894 0.5491 ... 1.849 -0.6287
          array([[[ 0.78936952,  0.5490887 ,  0.16650833, ...,  0.08329766,
                   -0.65050062,  0.29929534],
                  [ 1.58545972, -0.65388647, -0.65379105, ...,  1.82456396,
                   -0.19362754,  1.51704283],
                  [-0.95306398,  1.74037107, -1.06139752, ...,  0.49580659,
                   -1.65596289,  0.84096651],
                  ...,
                  [ 0.83862077,  0.72070695,  0.48932378, ..., -0.2039098 ,
                   -1.29151567,  1.33576567],
                  [ 0.36248347,  1.46751904,  2.691205  , ...,  1.45830882,
                   -0.35768443,  2.55530514],
                  [ 1.08745544,  1.27714706,  0.61058664, ...,  1.29672473,
                   -0.50342047,  2.35664708]],
          
                 [[ 1.03478446,  0.34214246, -0.02786286, ..., -1.94344799,
                   -1.74622235,  0.23291672],
                  [-1.13226371,  0.59456024, -0.63842647, ...,  0.36564697,
                   -0.64213818,  1.34387537],
                  [-1.13076226,  0.23707974, -1.6545314 , ..., -0.40823523,
                   -2.01952747,  1.78589938],
                  ...,
                  [ 1.07091423, -0.57066178,  0.11606562, ..., -1.94859916,
                   -0.54562754,  0.47149236],
                  [ 1.73615185, -0.27786063, -0.27283103, ..., -1.55429249,
                   -0.73246607,  0.73910541],
                  [-0.65499351,  1.15010742,  0.65100113, ..., -0.51231793,
                   -0.53271042,  1.44304005]],
          
                 [[ 0.49833716, -0.51620112,  0.13741193, ...,  0.501271  ,
                    1.09108997, -0.73316122],
                  [-0.25632797,  0.70929871, -0.30192588, ...,  0.74061067,
                    0.88777097,  0.1928401 ],
                  [ 0.24746999, -0.78483546,  0.05723709, ..., -0.06153329,
                   -2.12186644,  0.20316985],
                  ...,
                  [ 2.14989454,  1.12821892,  0.49014978, ...,  0.70910716,
                   -0.11305358, -0.26844358],
                  [ 0.79712821, -0.98653506,  0.27999657, ...,  0.02147621,
                    0.45285935, -0.223395  ],
                  [ 1.17281098, -0.88489812,  2.22847395, ...,  0.52398786,
                   -0.19246968,  0.97882991]],
          
                 [[ 0.15828557, -0.38448579, -0.2247607 , ...,  0.09849247,
                   -0.17279176,  0.79657494],
                  [ 0.3954921 , -0.67537986, -0.07942884, ...,  1.00072493,
                   -0.15591947,  0.71581227],
                  [ 2.66366278,  0.60968907, -0.42128861, ..., -0.09888939,
                    0.52831846,  0.29878227],
                  ...,
                  [-0.54199678, -0.4028017 , -1.59414456, ...,  2.31936087,
                    0.07555759,  0.57843756],
                  [ 1.20184084,  0.51496559,  0.73758509, ...,  1.82835713,
                    1.8487901 , -0.62868765],
                  [ 1.20184084,  0.51496559,  0.73758509, ...,  1.82835713,
                    1.8487901 , -0.62868765]]])
        • σ
          (chain, draw, race)
          float64
          140.4 252.7 183.9 ... 72.88 55.78
          array([[[140.36011672, 252.69076651, 183.8904596 ],
                  [161.51391431,  82.67823509, 212.55352477],
                  [108.91799094,  66.69192358,  88.42575348],
                  ...,
                  [ 31.69679346, 101.09097511,  32.56956811],
                  [148.25558444,  50.48937963, 103.02389557],
                  [170.53973503,  42.45131739,   7.22075687]],
          
                 [[ 81.39860974,  97.00223551,   5.23367679],
                  [ 28.60567987, 120.58701662, 119.74595091],
                  [ 24.85236716,  47.00875165,  62.47517088],
                  ...,
                  [ 27.08894035, 109.52428738,  89.74107174],
                  [101.36114868,  44.00684249,  63.21585206],
                  [ 45.44140301,  42.24565628,  32.21911083]],
          
                 [[ 85.15403518,  72.24973621, 101.9819129 ],
                  [ 69.33515359,  91.23129494, 140.7847575 ],
                  [ 45.56776301, 101.34687473,  65.85446419],
                  ...,
                  [ 39.67975301,  28.28842643,  52.09586543],
                  [227.54401728,  35.04100696,  46.01622763],
                  [141.84401665, 229.02600795,   5.01932257]],
          
                 [[170.73574582,   6.64000168, 256.76699449],
                  [ 77.7241646 ,  58.94863209,  63.38158179],
                  [ 92.43500404,  57.06879911,  99.61428138],
                  ...,
                  [ 34.21264796,  52.28070628, 126.57472452],
                  [179.13659055,  72.88096661,  55.7761304 ],
                  [179.13659055,  72.88096661,  55.7761304 ]]])
        • MMR
          (chain, draw, replay)
          float64
          3.574e+03 3.514e+03 ... 3.919e+03
          array([[[3574.47650843, 3513.75976477, 4079.48244533, ...,
                   4314.48720853, 4211.49119573, 4103.90070894],
                  [3426.82524018, 3241.68004931, 3815.08489516, ...,
                   4618.55704024, 4292.59103243, 4276.50328733],
                  [3384.72727505, 3564.35763932, 4141.85534813, ...,
                   4293.67624891, 4059.3098399 , 4310.07332137],
                  ...,
                  [3677.74379789, 3665.82377497, 3923.71921341, ...,
                   4244.49172209, 4210.01810344, 3951.28746012],
                  [3675.90453027, 3731.69709048, 4318.79087106, ...,
                   4537.56294544, 4268.33180356, 4304.78993801],
                  [3726.36593656, 3734.41859557, 4045.85794741, ...,
                   4599.72656921, 4292.73028387, 4058.46582531]],
          
                 [[3486.32112569, 3419.1333035 , 4135.21741888, ...,
                   3982.86934633, 3998.92323941, 4136.58225494],
                  [3533.87103837, 3742.10358598, 3969.14018261, ...,
                   4149.26695054, 4120.43857122, 4206.51280099],
                  [3623.24589541, 3687.54644032, 3827.74889736, ...,
                   4184.58134634, 4144.53692   , 4042.69039863],
                  ...,
                  [3547.14865165, 3367.35620982, 4014.82590683, ...,
                   4013.31809649, 4051.32311109, 4046.72228372],
                  [3458.69711886, 3370.06678874, 3936.91110358, ...,
                   3891.5459539 , 3974.84722316, 4000.8815279 ],
                  [3521.5666664 , 3597.8243401 , 4087.28805338, ...,
                   4399.01303974, 4398.08637637, 4112.80684303]],
          
                 [[3512.71609283, 3439.41596971, 4118.0735164 , ...,
                   4254.88960386, 4305.11506861, 4029.29080031],
                  [3348.55031945, 3436.64569193, 4155.76429966, ...,
                   4191.01867944, 4201.22206179, 4225.4198078 ],
                  [3822.39329786, 3717.77236616, 3832.27180076, ...,
                   4366.39440592, 4272.50963317, 3841.88212429],
                  ...,
                  [3816.72664015, 3787.82504444, 4191.07548085, ...,
                   4349.0593768 , 4316.43624179, 4151.55590297],
                  [3741.58220182, 3679.08084456, 3977.44197015, ...,
                   4235.96986521, 4334.12851785, 3954.27778896],
                  [3676.46562714, 3205.19672793, 3942.47619137, ...,
                   4348.73963984, 4247.11442498, 3936.20382483]],
          
                 [[3574.78254219, 3571.17853943, 4000.39660036, ...,
                   4330.853415  , 4284.53550087, 4262.64188132],
                  [3486.67762767, 3423.55119059, 4013.70776491, ...,
                   4192.37821489, 4102.47899548, 4064.11140391],
                  [3857.16116685, 3739.94335347, 4048.00002814, ...,
                   4455.43441496, 4513.41037517, 4119.72937191],
                  ...,
                  [3610.09054683, 3617.36776396, 3709.38928727, ...,
                   4583.79551357, 4507.02906206, 3984.38327026],
                  [3974.02197305, 3923.96184115, 3995.66366771, ...,
                   4584.36092651, 4588.0212183 , 3919.4582613 ],
                  [3974.02197305, 3923.96184115, 3995.66366771, ...,
                   4584.36092651, 4588.0212183 , 3919.4582613 ]]])
        • MMR_diff
          (chain, draw, replay)
          float64
          -173.5 -432.2 ... 651.0 -320.5
          array([[[-173.52349157, -432.24023523,  277.48244533, ...,
                    337.48720853,  274.49119573, -136.09929106],
                  [-321.17475982, -704.31995069,   13.08489516, ...,
                    641.55704024,  355.59103243,   36.50328733],
                  [-363.27272495, -381.64236068,  339.85534813, ...,
                    316.67624891,  122.3098399 ,   70.07332137],
                  ...,
                  [ -70.25620211, -280.17622503,  121.71921341, ...,
                    267.49172209,  273.01810344, -288.71253988],
                  [ -72.09546973, -214.30290952,  516.79087106, ...,
                    560.56294544,  331.33180356,   64.78993801],
                  [ -21.63406344, -211.58140443,  243.85794741, ...,
                    622.72656921,  355.73028387, -181.53417469]],
          
                 [[-261.67887431, -526.8666965 ,  333.21741888, ...,
                      5.86934633,   61.92323941, -103.41774506],
                  [-214.12896163, -203.89641402,  167.14018261, ...,
                    172.26695054,  183.43857122,  -33.48719901],
                  [-124.75410459, -258.45355968,   25.74889736, ...,
                    207.58134634,  207.53692   , -197.30960137],
                  ...,
                  [-200.85134835, -578.64379018,  212.82590683, ...,
                     36.31809649,  114.32311109, -193.27771628],
                  [-289.30288114, -575.93321126,  134.91110358, ...,
                    -85.4540461 ,   37.84722316, -239.1184721 ],
                  [-226.4333336 , -348.1756599 ,  285.28805338, ...,
                    422.01303974,  461.08637637, -127.19315697]],
          
                 [[-235.28390717, -506.58403029,  316.0735164 , ...,
                    277.88960386,  368.11506861, -210.70919969],
                  [-399.44968055, -509.35430807,  353.76429966, ...,
                    214.01867944,  264.22206179,  -14.5801922 ],
                  [  74.39329786, -228.22763384,   30.27180076, ...,
                    389.39440592,  335.50963317, -398.11787571],
                  ...,
                  [  68.72664015, -158.17495556,  389.07548085, ...,
                    372.0593768 ,  379.43624179,  -88.44409703],
                  [  -6.41779818, -266.91915544,  175.44197015, ...,
                    258.96986521,  397.12851785, -285.72221104],
                  [ -71.53437286, -740.80327207,  140.47619137, ...,
                    371.73963984,  310.11442498, -303.79617517]],
          
                 [[-173.21745781, -374.82146057,  198.39660036, ...,
                    353.853415  ,  347.53550087,   22.64188132],
                  [-261.32237233, -522.44880941,  211.70776491, ...,
                    215.37821489,  165.47899548, -175.88859609],
                  [ 109.16116685, -206.05664653,  246.00002814, ...,
                    478.43441496,  576.41037517, -120.27062809],
                  ...,
                  [-137.90945317, -328.63223604,  -92.61071273, ...,
                    606.79551357,  570.02906206, -255.61672974],
                  [ 226.02197305,  -22.03815885,  193.66366771, ...,
                    607.36092651,  651.0212183 , -320.5417387 ],
                  [ 226.02197305,  -22.03815885,  193.66366771, ...,
                    607.36092651,  651.0212183 , -320.5417387 ]]])
        • winrate
          (chain, draw, replay)
          float64
          0.3884 0.244 ... 0.846 0.3018
          array([[[0.38840135, 0.24397871, 0.67393861, ..., 0.70745598,
                   0.67221636, 0.41190061],
                  [0.30145528, 0.13670806, 0.50855856, ..., 0.84272985,
                   0.71716256, 0.52386025],
                  [0.27877826, 0.26921766, 0.70873675, ..., 0.69606027,
                   0.57933223, 0.54571002],
                  ...,
                  [0.45417135, 0.32451442, 0.57895556, ..., 0.66816823,
                   0.67136651, 0.31963761],
                  [0.45297858, 0.36337639, 0.79449259, ..., 0.81256357,
                   0.70411153, 0.5422807 ],
                  [0.485852  , 0.36502532, 0.65431758, ..., 0.83608882,
                   0.71723646, 0.38343406]],
          
                 [[0.33521265, 0.20123624, 0.7051384 , ..., 0.50383932,
                   0.5404183 , 0.43275976],
                  [0.36348169, 0.3696986 , 0.60762375, ..., 0.61081735,
                   0.61774329, 0.47810857],
                  [0.41910992, 0.3370959 , 0.51683711, ..., 0.63254534,
                   0.63251832, 0.37372364],
                  ...,
                  [0.37155715, 0.18033725, 0.6357291 , ..., 0.52373938,
                   0.57423102, 0.37619612],
                  [0.31930178, 0.181388  , 0.58734606, ..., 0.44433253,
                   0.5247373 , 0.34849273],
                  [0.35606613, 0.28678965, 0.67841064, ..., 0.75105153,
                   0.76967316, 0.41755699]],
          
                 [[0.35077423, 0.20990227, 0.69572652, ..., 0.67417267,
                   0.7237621 , 0.36555445],
                  [0.26014989, 0.20870266, 0.71619203, ..., 0.63645155,
                   0.66626863, 0.49046362],
                  [0.54851081, 0.35499039, 0.51979175, ..., 0.73475424,
                   0.70638391, 0.26082117],
                  ...,
                  [0.54483632, 0.39798298, 0.73459157, ..., 0.72582073,
                   0.72964516, 0.4424017 ],
                  [0.49580194, 0.33216402, 0.61279042, ..., 0.66320592,
                   0.73867943, 0.32134157],
                  [0.45334239, 0.12582742, 0.59087079, ..., 0.72565421,
                   0.69241571, 0.31111641]],
          
                 [[0.38859158, 0.27274337, 0.62694182, ..., 0.71623942,
                   0.71286761, 0.51480671],
                  [0.33542055, 0.20310077, 0.63505131, ..., 0.63727424,
                   0.60658696, 0.38693233],
                  [0.57092553, 0.36838244, 0.65558424, ..., 0.7776215 ,
                   0.81879732, 0.42196867],
                  ...,
                  [0.41075375, 0.29736221, 0.43971402, ..., 0.83029583,
                   0.81630679, 0.33875661],
                  [0.64368704, 0.48558788, 0.62404084, ..., 0.83050419,
                   0.84598416, 0.30180419],
                  [0.64368704, 0.48558788, 0.62404084, ..., 0.83050419,
                   0.84598416, 0.30180419]]])
      • created_at :
        2020-06-20T10:35:36.555638
        arviz_version :
        0.8.3
        inference_library :
        pymc3
        inference_library_version :
        3.9.1
        sampling_time :
        18.211029291152954
        tuning_steps :
        2000

    • Show/Hide data repr Show/Hide attributes
      xarray.Dataset
        • chain: 4
        • draw: 2000
        • race: 3
        • replay: 138
        • chain
          (chain)
          int64
          0 1 2 3
          array([0, 1, 2, 3])
        • draw
          (draw)
          int64
          0 1 2 3 4 ... 1996 1997 1998 1999
          array([   0,    1,    2, ..., 1997, 1998, 1999])
        • replay
          (replay)
          int64
          8 325 54 346 138 ... 25 208 59 364
          array([  8, 325,  54, 346, 138, 405,  20, 129, 104,  46, 302, 408, 101, 219,
                 316, 126,  98, 231, 241, 385, 193, 198,  90, 329, 137, 200,  80, 355,
                 317,  33,  64, 213, 368,  49, 435, 134, 254, 330,  60,  39, 218, 109,
                 301, 133, 328, 181, 156, 395,  43, 249,  27, 153, 211, 420, 366, 186,
                 163,  63, 202,  45,  69,  31, 167, 177,  95, 151, 392, 387,  18, 286,
                 102, 290, 195, 428, 403,  97, 406, 412, 374, 263, 371,  41, 212,  52,
                 238, 345,   4, 117, 407,  56, 103, 118, 319,  57, 128, 294,  15, 273,
                 327, 281, 378, 121, 113, 284, 422, 389, 216,  58, 418, 309, 123, 116,
                 222, 122,  11, 361, 179, 255, 239, 225, 381, 424, 343, 287, 341, 184,
                 380, 196, 174, 306, 252, 148, 416, 391,  25, 208,  59, 364])
        • race
          (race)
          <U7
          'Terran' 'Protoss' 'Zerg'
          array(['Terran', 'Protoss', 'Zerg'], dtype='<U7')
        • win
          (chain, draw, replay)
          int64
          0 0 1 1 0 0 1 0 ... 1 0 1 0 1 1 1 0
          array([[[0, 0, 1, ..., 1, 0, 0],
                  [1, 0, 0, ..., 1, 0, 0],
                  [0, 0, 1, ..., 1, 0, 0],
                  ...,
                  [1, 0, 0, ..., 1, 1, 1],
                  [1, 1, 1, ..., 1, 1, 1],
                  [0, 0, 1, ..., 1, 1, 1]],
          
                 [[1, 0, 0, ..., 0, 1, 0],
                  [1, 0, 1, ..., 1, 1, 0],
                  [0, 0, 1, ..., 1, 1, 0],
                  ...,
                  [1, 0, 1, ..., 0, 0, 1],
                  [1, 0, 1, ..., 1, 1, 0],
                  [1, 0, 1, ..., 0, 1, 0]],
          
                 [[1, 1, 0, ..., 0, 0, 0],
                  [1, 0, 1, ..., 1, 1, 0],
                  [0, 1, 0, ..., 1, 1, 1],
                  ...,
                  [1, 0, 0, ..., 1, 1, 0],
                  [0, 1, 1, ..., 1, 1, 0],
                  [1, 0, 0, ..., 1, 1, 0]],
          
                 [[0, 0, 1, ..., 1, 1, 1],
                  [0, 0, 1, ..., 1, 0, 0],
                  [0, 1, 0, ..., 1, 0, 1],
                  ...,
                  [0, 0, 0, ..., 0, 1, 1],
                  [1, 0, 0, ..., 1, 0, 0],
                  [0, 0, 0, ..., 1, 1, 0]]])
        • μ
          (chain, draw, race)
          float64
          4.303e+03 3.375e+03 ... 3.955e+03
          array([[[4302.79553938, 3375.01011989, 4048.86315149],
                  [4323.86457361, 3295.74222841, 3954.05048638],
                  [4239.6739907 , 3448.28894514, 4235.71022401],
                  ...,
                  [4250.95500899, 3592.96680679, 3907.78214913],
                  [4321.36051851, 3657.60296464, 4041.53244852],
                  [4378.58347689, 3680.20202035, 4041.44904971]],
          
                 [[4141.06331072, 3385.94471985, 4135.36324411],
                  [4138.80737046, 3670.4073407 , 4045.58916728],
                  [4194.72695819, 3676.40161761, 3931.11602939],
                  ...,
                  [4066.10358294, 3429.85753425, 4004.41005399],
                  [4049.09082588, 3382.29455772, 3954.15834981],
                  [4422.29348522, 3549.2372973 , 4066.31337586]],
          
                 [[4212.20435522, 3476.71136441, 4104.05998443],
                  [4139.66832504, 3371.93545224, 4198.27086105],
                  [4369.19834033, 3797.3129873 , 3828.50248262],
                  ...,
                  [4320.92217993, 3755.9095065 , 4165.54070368],
                  [4231.08308098, 3713.65002654, 3964.55758405],
                  [4274.41509776, 3407.86141075, 3931.29076179]],
          
                 [[4314.0372303 , 3573.73152574, 4058.10772914],
                  [4114.59770596, 3463.36390945, 4018.74209014],
                  [4464.57525582, 3705.14913054, 4089.96639073],
                  ...,
                  [4504.44403668, 3638.42652115, 3911.16769539],
                  [4256.83526394, 3886.43065114, 3954.52402571],
                  [4256.83526394, 3886.43065114, 3954.52402571]]])
        • σ
          (chain, draw, race)
          float64
          140.4 252.7 183.9 ... 72.88 55.78
          array([[[140.36011672, 252.69076651, 183.8904596 ],
                  [161.51391431,  82.67823509, 212.55352477],
                  [108.91799094,  66.69192358,  88.42575348],
                  ...,
                  [ 31.69679346, 101.09097511,  32.56956811],
                  [148.25558444,  50.48937963, 103.02389557],
                  [170.53973503,  42.45131739,   7.22075687]],
          
                 [[ 81.39860974,  97.00223551,   5.23367679],
                  [ 28.60567987, 120.58701662, 119.74595091],
                  [ 24.85236716,  47.00875165,  62.47517088],
                  ...,
                  [ 27.08894035, 109.52428738,  89.74107174],
                  [101.36114868,  44.00684249,  63.21585206],
                  [ 45.44140301,  42.24565628,  32.21911083]],
          
                 [[ 85.15403518,  72.24973621, 101.9819129 ],
                  [ 69.33515359,  91.23129494, 140.7847575 ],
                  [ 45.56776301, 101.34687473,  65.85446419],
                  ...,
                  [ 39.67975301,  28.28842643,  52.09586543],
                  [227.54401728,  35.04100696,  46.01622763],
                  [141.84401665, 229.02600795,   5.01932257]],
          
                 [[170.73574582,   6.64000168, 256.76699449],
                  [ 77.7241646 ,  58.94863209,  63.38158179],
                  [ 92.43500404,  57.06879911,  99.61428138],
                  ...,
                  [ 34.21264796,  52.28070628, 126.57472452],
                  [179.13659055,  72.88096661,  55.7761304 ],
                  [179.13659055,  72.88096661,  55.7761304 ]]])
        • winrate
          (chain, draw, replay)
          float64
          0.3884 0.244 ... 0.846 0.3018
          array([[[0.38840135, 0.24397871, 0.67393861, ..., 0.70745598,
                   0.67221636, 0.41190061],
                  [0.30145528, 0.13670806, 0.50855856, ..., 0.84272985,
                   0.71716256, 0.52386025],
                  [0.27877826, 0.26921766, 0.70873675, ..., 0.69606027,
                   0.57933223, 0.54571002],
                  ...,
                  [0.45417135, 0.32451442, 0.57895556, ..., 0.66816823,
                   0.67136651, 0.31963761],
                  [0.45297858, 0.36337639, 0.79449259, ..., 0.81256357,
                   0.70411153, 0.5422807 ],
                  [0.485852  , 0.36502532, 0.65431758, ..., 0.83608882,
                   0.71723646, 0.38343406]],
          
                 [[0.33521265, 0.20123624, 0.7051384 , ..., 0.50383932,
                   0.5404183 , 0.43275976],
                  [0.36348169, 0.3696986 , 0.60762375, ..., 0.61081735,
                   0.61774329, 0.47810857],
                  [0.41910992, 0.3370959 , 0.51683711, ..., 0.63254534,
                   0.63251832, 0.37372364],
                  ...,
                  [0.37155715, 0.18033725, 0.6357291 , ..., 0.52373938,
                   0.57423102, 0.37619612],
                  [0.31930178, 0.181388  , 0.58734606, ..., 0.44433253,
                   0.5247373 , 0.34849273],
                  [0.35606613, 0.28678965, 0.67841064, ..., 0.75105153,
                   0.76967316, 0.41755699]],
          
                 [[0.35077423, 0.20990227, 0.69572652, ..., 0.67417267,
                   0.7237621 , 0.36555445],
                  [0.26014989, 0.20870266, 0.71619203, ..., 0.63645155,
                   0.66626863, 0.49046362],
                  [0.54851081, 0.35499039, 0.51979175, ..., 0.73475424,
                   0.70638391, 0.26082117],
                  ...,
                  [0.54483632, 0.39798298, 0.73459157, ..., 0.72582073,
                   0.72964516, 0.4424017 ],
                  [0.49580194, 0.33216402, 0.61279042, ..., 0.66320592,
                   0.73867943, 0.32134157],
                  [0.45334239, 0.12582742, 0.59087079, ..., 0.72565421,
                   0.69241571, 0.31111641]],
          
                 [[0.38859158, 0.27274337, 0.62694182, ..., 0.71623942,
                   0.71286761, 0.51480671],
                  [0.33542055, 0.20310077, 0.63505131, ..., 0.63727424,
                   0.60658696, 0.38693233],
                  [0.57092553, 0.36838244, 0.65558424, ..., 0.7776215 ,
                   0.81879732, 0.42196867],
                  ...,
                  [0.41075375, 0.29736221, 0.43971402, ..., 0.83029583,
                   0.81630679, 0.33875661],
                  [0.64368704, 0.48558788, 0.62404084, ..., 0.83050419,
                   0.84598416, 0.30180419],
                  [0.64368704, 0.48558788, 0.62404084, ..., 0.83050419,
                   0.84598416, 0.30180419]]])
      • created_at :
        2020-06-20T10:35:37.090348
        arviz_version :
        0.8.3
        inference_library :
        pymc3
        inference_library_version :
        3.9.1

    • Show/Hide data repr Show/Hide attributes
      xarray.Dataset
        • chain: 4
        • draw: 2000
        • replay: 138
        • chain
          (chain)
          int64
          0 1 2 3
          array([0, 1, 2, 3])
        • draw
          (draw)
          int64
          0 1 2 3 4 ... 1996 1997 1998 1999
          array([   0,    1,    2, ..., 1997, 1998, 1999])
        • replay
          (replay)
          int64
          8 325 54 346 138 ... 25 208 59 364
          array([  8, 325,  54, 346, 138, 405,  20, 129, 104,  46, 302, 408, 101, 219,
                 316, 126,  98, 231, 241, 385, 193, 198,  90, 329, 137, 200,  80, 355,
                 317,  33,  64, 213, 368,  49, 435, 134, 254, 330,  60,  39, 218, 109,
                 301, 133, 328, 181, 156, 395,  43, 249,  27, 153, 211, 420, 366, 186,
                 163,  63, 202,  45,  69,  31, 167, 177,  95, 151, 392, 387,  18, 286,
                 102, 290, 195, 428, 403,  97, 406, 412, 374, 263, 371,  41, 212,  52,
                 238, 345,   4, 117, 407,  56, 103, 118, 319,  57, 128, 294,  15, 273,
                 327, 281, 378, 121, 113, 284, 422, 389, 216,  58, 418, 309, 123, 116,
                 222, 122,  11, 361, 179, 255, 239, 225, 381, 424, 343, 287, 341, 184,
                 380, 196, 174, 306, 252, 148, 416, 391,  25, 208,  59, 364])
        • win
          (chain, draw, replay)
          float64
          -0.9457 -0.2797 ... -0.1673 -1.198
          array([[[-0.94571606, -0.27968575, -1.1206696 , ..., -0.34607987,
                   -0.39717502, -0.88697319],
                  [-1.1991336 , -0.14700236, -0.7104125 , ..., -0.17110883,
                   -0.33245274, -0.64653033],
                  [-1.27733859, -0.31363962, -1.23352778, ..., -0.36231903,
                   -0.54587916, -0.60566754],
                  ...,
                  [-0.78928073, -0.39232348, -0.86501689, ..., -0.40321529,
                   -0.39844008, -1.14056741],
                  [-0.79191044, -0.45157668, -1.58227317, ..., -0.20756113,
                   -0.35081851, -0.61197151],
                  [-0.72185124, -0.45417016, -1.0622348 , ..., -0.17902043,
                   -0.3323497 , -0.95858761]],
          
                 [[-1.09299019, -0.22469005, -1.2212492 , ..., -0.68549787,
                   -0.61541181, -0.83757254],
                  [-1.01202636, -0.46155716, -0.93553407, ..., -0.4929573 ,
                   -0.48168229, -0.73791744],
                  [-0.86962207, -0.41112495, -0.72740143, ..., -0.45800338,
                   -0.4580461 , -0.9842387 ],
                  ...,
                  [-0.99005259, -0.1988623 , -1.00985747, ..., -0.64676108,
                   -0.5547235 , -0.97764469],
                  [-1.1416186 , -0.20014505, -0.88514597, ..., -0.81118206,
                   -0.64485752, -1.0541379 ],
                  [-1.03263881, -0.33797888, -1.13447981, ..., -0.28628102,
                   -0.26178932, -0.87333424]],
          
                 [[-1.04761249, -0.23559864, -1.18982837, ..., -0.39426901,
                   -0.32329253, -1.00634002],
                  [-1.34649731, -0.23408148, -1.25945741, ..., -0.45184699,
                   -0.40606233, -0.71240417],
                  [-0.60054829, -0.43849007, -0.73353543, ..., -0.30821921,
                   -0.34759641, -1.34392027],
                  ...,
                  [-0.60726986, -0.50746956, -1.3264854 , ..., -0.32045223,
                   -0.31519695, -0.81553699],
                  [-0.70157875, -0.40371268, -0.94878918, ..., -0.41066975,
                   -0.30289124, -1.13525063],
                  [-0.7911076 , -0.13447746, -0.89372426, ..., -0.32068168,
                   -0.36756877, -1.16758814]],
          
                 [[-0.9452264 , -0.31847587, -0.98602091, ..., -0.33374078,
                   -0.33845955, -0.66396377],
                  [-1.09237016, -0.22702705, -1.00799851, ..., -0.45055519,
                   -0.49990719, -0.94950547],
                  [-0.56049651, -0.45947119, -1.06590574, ..., -0.25151537,
                   -0.1999187 , -0.86282421],
                  ...,
                  [-0.88976139, -0.35291376, -0.57930794, ..., -0.18597321,
                   -0.20296503, -1.08247338],
                  [-0.44054263, -0.66473054, -0.97827477, ..., -0.1857223 ,
                   -0.16725464, -1.19797685],
                  [-0.44054263, -0.66473054, -0.97827477, ..., -0.1857223 ,
                   -0.16725464, -1.19797685]]])
      • created_at :
        2020-06-20T10:35:37.087198
        arviz_version :
        0.8.3
        inference_library :
        pymc3
        inference_library_version :
        3.9.1

    • Show/Hide data repr Show/Hide attributes
      xarray.Dataset
        • chain: 4
        • draw: 2000
        • chain
          (chain)
          int64
          0 1 2 3
          array([0, 1, 2, 3])
        • draw
          (draw)
          int64
          0 1 2 3 4 ... 1996 1997 1998 1999
          array([   0,    1,    2, ..., 1997, 1998, 1999])
        • step_size_bar
          (chain, draw)
          float64
          0.4374 0.4374 ... 0.4903 0.4903
          array([[0.4374115 , 0.4374115 , 0.4374115 , ..., 0.4374115 , 0.4374115 ,
                  0.4374115 ],
                 [0.45402308, 0.45402308, 0.45402308, ..., 0.45402308, 0.45402308,
                  0.45402308],
                 [0.41388167, 0.41388167, 0.41388167, ..., 0.41388167, 0.41388167,
                  0.41388167],
                 [0.49034327, 0.49034327, 0.49034327, ..., 0.49034327, 0.49034327,
                  0.49034327]])
        • energy_error
          (chain, draw)
          float64
          -1.016 0.3132 ... 0.6163 0.0
          array([[-1.01642236,  0.31318099, -0.14019916, ..., -0.00712864,
                  -0.41741377, -0.08385882],
                 [-0.38042493, -1.50079731, -0.16318778, ..., -0.24735973,
                  -0.2886005 , -0.17678952],
                 [-2.01224887, -0.89066887,  0.47713108, ..., -1.70039887,
                   0.31851951,  0.11482341],
                 [ 1.43938357,  0.2229521 ,  0.32288281, ..., -0.04535445,
                   0.61629039,  0.        ]])
        • step_size
          (chain, draw)
          float64
          0.4386 0.4386 ... 0.425 0.425
          array([[0.43855251, 0.43855251, 0.43855251, ..., 0.43855251, 0.43855251,
                  0.43855251],
                 [0.48249608, 0.48249608, 0.48249608, ..., 0.48249608, 0.48249608,
                  0.48249608],
                 [0.44391835, 0.44391835, 0.44391835, ..., 0.44391835, 0.44391835,
                  0.44391835],
                 [0.42501071, 0.42501071, 0.42501071, ..., 0.42501071, 0.42501071,
                  0.42501071]])
        • max_energy_error
          (chain, draw)
          float64
          -1.287 1.11 -0.4291 ... 1.535 5.196
          array([[-1.28737009,  1.11007453, -0.42910467, ...,  0.91347544,
                   0.52800764,  0.47859559],
                 [-0.48591337, -1.50079731,  2.16250099, ..., -0.24735973,
                   3.77015272, -0.76572754],
                 [-2.328056  ,  1.01810228,  0.80442549, ..., -1.70039887,
                  -0.55804924, 74.25084326],
                 [38.71084628,  1.20965313,  0.49249056, ...,  1.35746487,
                   1.53478843,  5.19565611]])
        • diverging
          (chain, draw)
          bool
          False False False ... False False
          array([[False, False, False, ..., False, False, False],
                 [False, False, False, ..., False, False, False],
                 [False, False, False, ..., False, False, False],
                 [False, False, False, ..., False, False, False]])
        • depth
          (chain, draw)
          int64
          4 3 3 4 4 3 3 3 ... 3 3 3 3 3 3 3 3
          array([[4, 3, 3, ..., 3, 3, 4],
                 [3, 3, 3, ..., 3, 3, 3],
                 [4, 3, 3, ..., 4, 4, 4],
                 [3, 3, 3, ..., 3, 3, 3]])
        • mean_tree_accept
          (chain, draw)
          float64
          0.9054 0.7214 ... 0.4055 0.07633
          array([[0.90541692, 0.72142566, 0.93134252, ..., 0.85369685, 0.9554831 ,
                  0.86302654],
                 [0.99759711, 0.99963932, 0.88165678, ..., 0.96310244, 0.78523323,
                  0.97673572],
                 [0.99816125, 0.88683585, 0.75217549, ..., 0.96863687, 0.92512264,
                  0.86677524],
                 [0.40260816, 0.83998264, 0.84497975, ..., 0.76832421, 0.4055396 ,
                  0.07633182]])
        • energy
          (chain, draw)
          float64
          356.5 384.7 373.6 ... 368.5 373.4
          array([[356.54520829, 384.72052031, 373.61948961, ..., 390.95997962,
                  395.89754948, 395.0117275 ],
                 [410.94614041, 383.5146222 , 361.83684381, ..., 373.49242948,
                  364.71453224, 360.19568382],
                 [391.28602749, 376.75745726, 387.21260602, ..., 390.37738103,
                  377.07691302, 389.32502442],
                 [358.39179418, 363.878841  , 377.07222589, ..., 378.63812646,
                  368.46859802, 373.42582631]])
        • lp
          (chain, draw)
          float64
          -302.1 -305.8 ... -302.2 -302.2
          array([[-302.08558028, -305.77270943, -300.43477915, ..., -320.70266421,
                  -315.38015305, -311.86956419],
                 [-324.9312429 , -298.99886287, -298.64220017, ..., -301.73942136,
                  -301.70998423, -295.83681186],
                 [-310.88193965, -301.57205804, -313.61330102, ..., -309.33294253,
                  -310.28663405, -315.73379124],
                 [-294.91496388, -306.34122894, -309.38563566, ..., -304.01227822,
                  -302.20722956, -302.20722956]])
        • tree_size
          (chain, draw)
          float64
          15.0 7.0 7.0 15.0 ... 7.0 7.0 7.0
          array([[15.,  7.,  7., ...,  7.,  7., 15.],
                 [ 7.,  7.,  7., ...,  7.,  7.,  7.],
                 [15.,  7.,  7., ..., 15., 15., 15.],
                 [ 7.,  7.,  7., ...,  7.,  7.,  7.]])
      • created_at :
        2020-06-20T10:35:36.562793
        arviz_version :
        0.8.3
        inference_library :
        pymc3
        inference_library_version :
        3.9.1
        sampling_time :
        18.211029291152954
        tuning_steps :
        2000

    • Show/Hide data repr Show/Hide attributes
      xarray.Dataset
        • chain: 1
        • draw: 2000
        • race: 3
        • replay: 138
        • chain
          (chain)
          int64
          0
          array([0])
        • draw
          (draw)
          int64
          0 1 2 3 4 ... 1996 1997 1998 1999
          array([   0,    1,    2, ..., 1997, 1998, 1999])
        • race
          (race)
          <U7
          'Terran' 'Protoss' 'Zerg'
          array(['Terran', 'Protoss', 'Zerg'], dtype='<U7')
        • replay
          (replay)
          int64
          8 325 54 346 138 ... 25 208 59 364
          array([  8, 325,  54, 346, 138, 405,  20, 129, 104,  46, 302, 408, 101, 219,
                 316, 126,  98, 231, 241, 385, 193, 198,  90, 329, 137, 200,  80, 355,
                 317,  33,  64, 213, 368,  49, 435, 134, 254, 330,  60,  39, 218, 109,
                 301, 133, 328, 181, 156, 395,  43, 249,  27, 153, 211, 420, 366, 186,
                 163,  63, 202,  45,  69,  31, 167, 177,  95, 151, 392, 387,  18, 286,
                 102, 290, 195, 428, 403,  97, 406, 412, 374, 263, 371,  41, 212,  52,
                 238, 345,   4, 117, 407,  56, 103, 118, 319,  57, 128, 294,  15, 273,
                 327, 281, 378, 121, 113, 284, 422, 389, 216,  58, 418, 309, 123, 116,
                 222, 122,  11, 361, 179, 255, 239, 225, 381, 424, 343, 287, 341, 184,
                 380, 196, 174, 306, 252, 148, 416, 391,  25, 208,  59, 364])
        • μ
          (chain, draw, race)
          float64
          4.487e+03 3.816e+03 ... 4.079e+03
          array([[[4487.3036091 , 3816.4730759 , 3841.54847432],
                  [3678.10941335, 4259.6222888 , 3309.53839094],
                  [4523.44352926, 3771.63792973, 4095.71172882],
                  ...,
                  [3793.7352304 , 3936.80991215, 3897.05804332],
                  [4287.27113474, 4067.38137671, 3856.85673442],
                  [3792.63645476, 3763.38063103, 4079.25539045]]])
        • σ
          (chain, draw, race)
          float64
          10.45 53.54 169.3 ... 210.5 146.2
          array([[[ 10.45030045,  53.53690568, 169.32540234],
                  [ 23.57617238,  10.93212404,  83.18141646],
                  [125.6331917 ,  94.68059879, 168.58509729],
                  ...,
                  [ 54.01739286, 112.35908554, 107.02562404],
                  [144.26356103,  77.82838645,   9.93539497],
                  [ 81.81960096, 210.54208204, 146.24259794]]])
        • winrate
          (chain, draw, replay)
          float64
          0.4452 0.4443 ... 0.4049 0.3675
          array([[[0.44516586, 0.44432904, 0.49543905, ..., 0.79673329,
                   0.80140205, 0.28212387],
                  [0.7972168 , 0.68737573, 0.21071926, ..., 0.31760374,
                   0.3228919 , 0.08274033],
                  [0.46947403, 0.43159697, 0.78947532, ..., 0.82439068,
                   0.80940984, 0.32718542],
                  ...,
                  [0.74439685, 0.57396175, 0.48594935, ..., 0.37104134,
                   0.37754386, 0.3333573 ],
                  [0.70701564, 0.56655281, 0.54098671, ..., 0.57389202,
                   0.76269576, 0.26823939],
                  [0.59530994, 0.28697282, 0.72372083, ..., 0.36763267,
                   0.40492739, 0.36749525]]])
      • created_at :
        2020-06-20T10:35:37.093692
        arviz_version :
        0.8.3
        inference_library :
        pymc3
        inference_library_version :
        3.9.1

    • Show/Hide data repr Show/Hide attributes
      xarray.Dataset
        • chain: 1
        • draw: 2000
        • replay: 138
        • chain
          (chain)
          int64
          0
          array([0])
        • draw
          (draw)
          int64
          0 1 2 3 4 ... 1996 1997 1998 1999
          array([   0,    1,    2, ..., 1997, 1998, 1999])
        • replay
          (replay)
          int64
          8 325 54 346 138 ... 25 208 59 364
          array([  8, 325,  54, 346, 138, 405,  20, 129, 104,  46, 302, 408, 101, 219,
                 316, 126,  98, 231, 241, 385, 193, 198,  90, 329, 137, 200,  80, 355,
                 317,  33,  64, 213, 368,  49, 435, 134, 254, 330,  60,  39, 218, 109,
                 301, 133, 328, 181, 156, 395,  43, 249,  27, 153, 211, 420, 366, 186,
                 163,  63, 202,  45,  69,  31, 167, 177,  95, 151, 392, 387,  18, 286,
                 102, 290, 195, 428, 403,  97, 406, 412, 374, 263, 371,  41, 212,  52,
                 238, 345,   4, 117, 407,  56, 103, 118, 319,  57, 128, 294,  15, 273,
                 327, 281, 378, 121, 113, 284, 422, 389, 216,  58, 418, 309, 123, 116,
                 222, 122,  11, 361, 179, 255, 239, 225, 381, 424, 343, 287, 341, 184,
                 380, 196, 174, 306, 252, 148, 416, 391,  25, 208,  59, 364])
        • win
          (chain, draw, replay)
          int64
          1 1 0 0 1 1 1 0 ... 0 0 0 1 1 0 0 0
          array([[[1, 1, 0, ..., 1, 1, 0],
                  [1, 1, 0, ..., 0, 0, 0],
                  [1, 0, 0, ..., 1, 1, 0],
                  ...,
                  [1, 1, 0, ..., 0, 0, 0],
                  [1, 1, 0, ..., 1, 0, 0],
                  [0, 0, 0, ..., 0, 0, 0]]])
      • created_at :
        2020-06-20T10:35:37.095318
        arviz_version :
        0.8.3
        inference_library :
        pymc3
        inference_library_version :
        3.9.1

    • Show/Hide data repr Show/Hide attributes
      xarray.Dataset
        • replay: 138
        • replay
          (replay)
          int64
          8 325 54 346 138 ... 25 208 59 364
          array([  8, 325,  54, 346, 138, 405,  20, 129, 104,  46, 302, 408, 101, 219,
                 316, 126,  98, 231, 241, 385, 193, 198,  90, 329, 137, 200,  80, 355,
                 317,  33,  64, 213, 368,  49, 435, 134, 254, 330,  60,  39, 218, 109,
                 301, 133, 328, 181, 156, 395,  43, 249,  27, 153, 211, 420, 366, 186,
                 163,  63, 202,  45,  69,  31, 167, 177,  95, 151, 392, 387,  18, 286,
                 102, 290, 195, 428, 403,  97, 406, 412, 374, 263, 371,  41, 212,  52,
                 238, 345,   4, 117, 407,  56, 103, 118, 319,  57, 128, 294,  15, 273,
                 327, 281, 378, 121, 113, 284, 422, 389, 216,  58, 418, 309, 123, 116,
                 222, 122,  11, 361, 179, 255, 239, 225, 381, 424, 343, 287, 341, 184,
                 380, 196, 174, 306, 252, 148, 416, 391,  25, 208,  59, 364])
        • win
          (replay)
          float64
          1.0 0.0 0.0 1.0 ... 1.0 1.0 1.0 1.0
          array([1., 0., 0., 1., 1., 0., 1., 0., 1., 0., 0., 1., 0., 0., 0., 0., 1.,
                 1., 0., 0., 0., 1., 0., 0., 1., 0., 0., 1., 1., 1., 1., 1., 1., 0.,
                 0., 0., 1., 0., 1., 1., 1., 1., 1., 1., 1., 0., 1., 0., 1., 0., 1.,
                 0., 1., 0., 1., 1., 1., 1., 0., 0., 1., 0., 0., 1., 0., 0., 0., 1.,
                 1., 1., 0., 1., 1., 0., 0., 1., 1., 1., 1., 0., 1., 0., 1., 1., 0.,
                 0., 1., 0., 1., 0., 1., 1., 0., 1., 0., 0., 0., 0., 1., 0., 0., 0.,
                 1., 0., 1., 0., 1., 0., 1., 0., 1., 0., 1., 0., 0., 0., 1., 1., 1.,
                 0., 0., 0., 0., 1., 1., 0., 1., 0., 0., 1., 1., 1., 1., 0., 1., 1.,
                 1., 1.])
      • created_at :
        2020-06-20T10:35:37.096098
        arviz_version :
        0.8.3
        inference_library :
        pymc3
        inference_library_version :
        3.9.1

    • Show/Hide data repr Show/Hide attributes
      xarray.Dataset
        • replay: 138
        • replay
          (replay)
          int64
          8 325 54 346 138 ... 25 208 59 364
          array([  8, 325,  54, 346, 138, 405,  20, 129, 104,  46, 302, 408, 101, 219,
                 316, 126,  98, 231, 241, 385, 193, 198,  90, 329, 137, 200,  80, 355,
                 317,  33,  64, 213, 368,  49, 435, 134, 254, 330,  60,  39, 218, 109,
                 301, 133, 328, 181, 156, 395,  43, 249,  27, 153, 211, 420, 366, 186,
                 163,  63, 202,  45,  69,  31, 167, 177,  95, 151, 392, 387,  18, 286,
                 102, 290, 195, 428, 403,  97, 406, 412, 374, 263, 371,  41, 212,  52,
                 238, 345,   4, 117, 407,  56, 103, 118, 319,  57, 128, 294,  15, 273,
                 327, 281, 378, 121, 113, 284, 422, 389, 216,  58, 418, 309, 123, 116,
                 222, 122,  11, 361, 179, 255, 239, 225, 381, 424, 343, 287, 341, 184,
                 380, 196, 174, 306, 252, 148, 416, 391,  25, 208,  59, 364])
        • enemy_race
          (replay)
          int32
          1 1 2 2 1 1 2 1 ... 2 2 0 2 2 0 0 2
          array([1, 1, 2, 2, 1, 1, 2, 1, 1, 2, 2, 2, 1, 1, 0, 2, 2, 0, 0, 2, 0, 2,
                 2, 1, 1, 2, 2, 0, 0, 0, 0, 0, 0, 2, 0, 1, 2, 1, 1, 2, 2, 2, 1, 0,
                 0, 1, 0, 2, 2, 2, 1, 0, 2, 1, 0, 2, 1, 0, 1, 1, 2, 2, 2, 2, 1, 2,
                 1, 2, 0, 0, 0, 1, 0, 2, 2, 0, 0, 0, 0, 1, 0, 1, 2, 0, 1, 2, 2, 1,
                 2, 1, 0, 2, 2, 2, 1, 0, 0, 2, 1, 1, 1, 1, 0, 0, 0, 1, 0, 2, 0, 2,
                 0, 1, 0, 0, 2, 0, 0, 0, 2, 1, 0, 1, 1, 0, 2, 1, 0, 2, 0, 1, 2, 2,
                 0, 2, 2, 0, 0, 2], dtype=int32)
        • enemy_mmr
          (replay)
          int32
          3748 3946 3802 ... 3977 3937 4240
          array([3748, 3946, 3802, 3816, 3701, 3861, 3907, 4066, 3757, 4350, 3964,
                 3894, 3932, 3952, 3955, 3912, 3744, 3492, 4642, 3756, 3664, 3769,
                 3871, 3631, 3631, 3685, 3626, 3647, 3626, 3736, 3784, 3856, 3866,
                 3847, 3883, 3761, 3686, 3827, 3771, 3752, 3803, 3922, 3888, 3900,
                 3962, 3992, 3798, 3797, 3790, 3966, 3881, 3823, 3904, 3920, 3907,
                 3961, 3874, 3570, 4359, 4009, 3859, 3988, 3885, 4020, 3935, 3908,
                 4596, 4851, 3941, 3808, 3942, 3854, 3956, 3976, 3998, 3953, 4068,
                 3960, 4016, 4055, 3925, 4104, 3989, 4001, 4237, 4161, 4024, 4108,
                 4125, 4028, 4012, 3992, 4144, 4029, 4051, 4131, 4407, 4037, 3965,
                 3944, 4169, 3882, 4018, 4066, 3828, 3957, 4181, 4160, 3886, 3963,
                 3875, 3956, 3976, 3953, 3757, 4007, 3911, 3967, 4935, 3898, 3880,
                 3927, 3948, 3833, 3894, 3782, 3786, 3845, 3863, 3966, 3864, 3843,
                 3840, 4033, 3914, 3977, 3937, 4240], dtype=int32)
      • created_at :
        2020-06-20T10:35:37.097169
        arviz_version :
        0.8.3
        inference_library :
        pymc3
        inference_library_version :
        3.9.1

That InferenceData ArviZ object lets us see everything the model picked up. It's really, really neat.

We had a few divergences; not too many, though Let's take a look at how the sampling went:

In [29]:
var_names = "μ σ".split()
az.plot_trace(output, var_names=var_names);
In [35]:
az.summary(output, var_names = var_names)
Out[35]:
mean sd hdi_3% hdi_97% mcse_mean mcse_sd ess_mean ess_sd ess_bulk ess_tail r_hat
μ[0] 4275.797 116.495 4066.919 4504.642 1.418 1.005 6750.0 6715.0 6767.0 4891.0 1.0
μ[1] 3625.102 122.610 3403.476 3865.610 1.407 0.995 7597.0 7597.0 7622.0 4916.0 1.0
μ[2] 3984.044 105.523 3785.491 4182.183 1.353 0.957 6082.0 6082.0 6082.0 4802.0 1.0
σ[0] 78.531 59.788 0.019 184.598 0.819 0.692 5331.0 3737.0 4413.0 3198.0 1.0
σ[1] 76.320 58.370 0.030 180.889 0.773 0.547 5699.0 5699.0 4607.0 3176.0 1.0
σ[2] 85.882 64.475 0.266 201.367 0.970 0.686 4420.0 4420.0 3717.0 3351.0 1.0
In [33]:
az.plot_pair(output, var_names='μ', divergences=True);