Skip to content

Commit

Permalink
Comment out Math comments, to make plots work
Browse files Browse the repository at this point in the history
  • Loading branch information
TheReconPilot committed May 5, 2022
1 parent c530d7c commit 772beed
Showing 1 changed file with 11 additions and 10 deletions.
21 changes: 11 additions & 10 deletions EM/Multivariate/playground-3d.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -33,12 +33,13 @@
"source": [
"## Generate Data\n",
"\n",
"Covariance Matrix $\\Sigma$ must be positive semi-definite.\n",
"Covariance Matrix Sigma must be positive semi-definite.\n",
"\n",
"One way to make sure that we have a positive semi-definite matrix when generating random matrices is:\n",
"\n",
"- Generate Random Matrix A\n",
"- $C = A^\\intercal A$ will be positive semi-definite"
"- Multiply A with its transpose\n",
"- The result will be positive semi-definite"
]
},
{
Expand Down Expand Up @@ -140,11 +141,11 @@
"\n",
"### Multivariate Normal Distribution\n",
"\n",
"$$\n",
"<!-- $$\n",
"p(\\boldsymbol{x}; \\mu, \\Sigma) = \\det(2 \\pi \\Sigma)^{-\\frac{1}{2}} e^{-\\frac{1}{2} (\\boldsymbol{x} - \\mu)^\\intercal \\Sigma^{-1} (\\boldsymbol{x} - \\mu)}\n",
"$$\n",
"\n",
"Where Covariance Matrix $\\Sigma$ must be positive semi-definite."
"Where Covariance Matrix $\\Sigma$ must be positive semi-definite. -->"
]
},
{
Expand Down Expand Up @@ -216,10 +217,10 @@
"source": [
"### Expectation Step\n",
"\n",
"$$\n",
"<!-- $$\n",
"\\large\n",
"\\gamma (z_{nk}) = \\frac{\\pi_k \\mathcal{N}(\\boldsymbol{x}_n | \\mu_k, \\Sigma_k)}{\\sum\\limits_{j=1}^{K} \\pi_j \\mathcal{N}(\\boldsymbol{x}_n | \\mu_j, \\Sigma_j)}\n",
"$$"
"$$ -->"
]
},
{
Expand Down Expand Up @@ -250,7 +251,7 @@
"source": [
"### Maximization Step\n",
"\n",
"Define\n",
"<!-- Define\n",
"\n",
"$$\n",
"N_k = \\sum\\limits_{n=1}^{N} \\gamma(z_{nk})\n",
Expand All @@ -269,7 +270,7 @@
"\n",
"$$\n",
"\\Sigma^*_k = \\frac{1}{N_k} \\sum\\limits_{n=1}^{N} \\gamma(z_{nk}) (\\boldsymbol{x}_n - \\mu_k)(\\boldsymbol{x}_n - \\mu_k)^\\intercal\n",
"$$\n"
"$$ -->\n"
]
},
{
Expand Down Expand Up @@ -302,9 +303,9 @@
"source": [
"### Log Likelihood\n",
"\n",
"$$\n",
"<!-- $$\n",
"\\ln p(\\boldsymbol{X}) = \\sum_{n=1}^{N} \\ln \\sum_{k=1}^{K} \\pi_k \\mathcal{N}(\\boldsymbol{x}_n | \\mu_k, \\Sigma_k)\n",
"$$"
"$$ -->"
]
},
{
Expand Down

0 comments on commit 772beed

Please sign in to comment.