Question at the intersection of ML and statistics.
I built a binary classification ML model, that for each input observation x outputs the probability p(x) in (0,1) that x belongs to the positive class. I am satisfied with the evaluation metrics. I have not chosen a threshold yet, although I do not know if that is relevant for the following questions.
I have an observation x. Without knowing anything else about it, my best guess for x belonging to the positive class is the frequency of the positive labels in the known population (let's say positive/total in the training or testing data - that frequency is approximately the same, so it does not matter which data set we consider). This is my Bayesian prior.
Suppose my new observation x is scored by my model as p(x) = p. How do I adjust my Bayesian prior with this new information? In other words, what is P(x = 1 | p(x) = p)?
My thoughts are as follows. For a model threshold of t, I can calculate the precision TP / (TP + FP) at threshold t. Then I have P(x=1 | p(x)>=t) = P(x=1 | model at threshold t classifies x=1) = TP / (TP + FP), that is, exactly the precision above.
But how do I turn the >= in the conditional probability into an = sign?