In cluster analysis how do we calculate purity? What's the equation?
I'm not looking for a code to do it for me.

Let $\omega_k$ be cluster k, and $c_j$ be class j.
So is purity practically accuracy? it looks like were summing the amount of truly classified class per cluster over the sample size.
The question is what is the relationship between the output and the input?
If there's Truly Positive(TP), Truly Negative (TN), Falsely Positive(FP), Falsely Negative (FN). Is it $Purity = \frac{TP_K}{(TP+TN+FP+FN)}$?