$$ P(A \mid B) = \frac{P(B \mid A) \, P(A)}{P(B)} $$
github.com/hnryjmes