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)}$?
figured it out,
Purity is the the accuracy of the most frequent cluster, so it the number of occurrences of the most frequent classes / the size of the clusteres (this should be high)