I am implementing some code, and want to implement the following: Calculate the probability that event A occurred based on weighted premises.
So I want to be able to define some premises (other events that occurred in the system - these either occurred or not - I know whether they occurred for sure or not). These premises have different weights in terms of how much do they commit to the occurrence of event A and are independent of each other.
So for instance, a dummy example (weight of the event is in the parenthesis):
a) clouds are visible on the sky (4)
b) it was raining yesterday (1)
c) rain detectors detected water (7)
d) relative humidity in the air is high (6)
Before calculating I know that these events happened or not. And I want to calculate probability whether it is raining at the moment (event A) based on a), b), c), d) premises (events) that have different weights.
Could you point me in the right direction? Thank you
One possibility is to fit a logistic regression model, usually, we assume that the weights are not known and we try to find the best coefficient that fit it.
Suppose $x_i$ are the indicators of whether premise $i$ occur, we find weight $w_i$ and fit the model that
$$p=\frac1{1+b^{-(w_0 + \sum_{i=1}^n w_i x_i)}}$$
A typical choice of $b$ is let $b=e$. In your case, you have decided on your $w_i$, $i \ge 1$. You can still collect data and try to determine $w_0$ that best fit the data.
If the variable would positive indicator, give it a positive weight, otherwise give it a negative weight.
In genelra, we can compute a score, $s= \sum_{i=1}^n w_ix_i$ and find an increasing function with image $(0,1)$, $g$, and predict it with $g(s)$.