Hi all,
I have the following arviz.InferenceData
-object:
fit = az.from_pystan(
posterior=fit,
posterior_model=model,
coords={
'driver': list(drivers_idx.keys()),
'team': list(teams_idx.keys()),
'circuit': list(circuits_idx.keys())
},
dims={
'theta': ['driver'],
'tau': ['team'],
'phi': ['team', 'circuit']
}
)
Basically, theta
represent the skill of a driver (for example Max Verstappen), tau
represent the skill of a team (Red Bull) and phi
represent the circuit-specific skill of a team (Red Bull on Circuit of Monaco.
I want to create a matrix of shape (n_teams, n_circuits) of posterior means of phi
- tau
. How do I make sure that the pairwise subtraction is done based on the shared team
-coords?
Can this matrix be seen as a correlation matrix or which additional steps are needed to create one?
The goal is to measure the similarity between the circuits.