Given a set of events {A, B, C, D, E}
that occur once each month for n
years:
[A, B, C, C, B, D, A, B, C, C, B, D]
[E, B, C, B, B, D, E, B, C, B, B, D]
[C, B, C, D, E, A, A, D, C, C, B, D] //12 months x 3 years pictured
...
I have the probability function p(w, r) = ...
which computes the probability of an event to follow another (e.g. A after B), where w
and r
are parameters that model the output in such way that when correctly picked should fit the sample data.
My final goal is to predict events in a year, but I'm stuck at using EM to determine w
and r
.
Intuitively, what I do now is:
- Start with a total random value for
w
andr
- Compute the probability for each pair in a year (e.g.
A
andB
) usingp
function, compare it with the actual probability distribution extracted from the samples and basically getting how probable (v
) is for the currentw
andr
to be to fit the samples. - Now my 3rd step would be to modify
w
andr
so thatv
should converge towards 1. This is where I'm stuck.
How should I use v
to get new values for w
and r
so that v
will eventually converge towards 1?
EDIT:
I'd like to add that p
basically gives me the estimated probability distribution for the event succession. Which means that I have two 2D surfaces: the estimate and the sampled probability distributions and I want to use w
and r
to shift and scale the estimated surface in such way that it fits best the sampled one.
So my problem is, how can I compare the two after a step and how should I get new w
and r
values for the next step.
E.g.: I was thinking that I could use some kind of matrix norm, to get the degree of similarity between the two and then use this to decide, based on previous iterations if I should increase w
/r
or decrease.
w
,r
are the parameters of my model. I'm looking to find the maximum likelihood estimates for them. $\endgroup$p
. $\endgroup$