Describe mismatch calculation (issue
"cell_type": "markdown",
"metadata": {},
"source": [
- "As expected, the fit is improved."
+ "As expected, the fit is slightly improved. By now, you may be wondering how the mistmatch is actually calculated in Covasim. It follows more or less this expression: \n",
+ "\n",
+ "$\\text{mismatch} = \\sum_i\\left(\\sum_t\\dfrac{|d_i(t) - m_i(t)|}{\\text{max}(d_i(t))}\\right)$\n",
+ "\n",
+ "where $i$ is over different data quantities (eg, `cum_tests`, `cum_deaths`, `cum_diagnoses` in this example); $t$ is time; $d_i(t)$ is the time series of data for quantity $i$ (the lines with square markers in the figures); and, $m_i(t)$ is the time series of the model for quantity $i$ (solid lines). \n",
+ "\n",
+ "Each data quantity $i$ has very different scales. Cumulative deaths could be in the few hundreds, while cumulative diagnoses could be in the tens of thousands (or more). For that reason we use the term $\\text{max}(d_i(t))$, so we can reasonably add individual mismatches of different quantities like cumulative deaths and diagnoses, to produce an overall mismatch, which is a 'normalized' absolute error of sorts. "
]
},
{
