hildensia / bayesian_changepoint_detection

Methods to get the probability of a changepoint in a time series.
MIT License
670 stars 213 forks source link

Updating parameters for bayesian online change point #30

Closed celdorwow closed 3 years ago

celdorwow commented 3 years ago

I think my question is related to the one, which was not answered and is already closed: https://github.com/hildensia/bayesian_changepoint_detection/issues/19

In your example, you have applied the student t-distribution as a likelihood. I understand the distribution, its parameters, but I have a question about how you set up prior and update its parameters in the code. So the following is:

df = 2*self.alpha
scale = np.sqrt(self.beta * (self.kappa+1) / (self.alpha * self.kappa))

I don't understand what alpha, beta and kappa correspond to. How have you come across this expression? The paper by Adams and McKey refers to updating sufficient statistics. Is your expression related to that? If so, how can I do that for any other distribution, let's say gaussian? In my comment, I refer to the following formula in the paper:

equation

hildensia commented 3 years ago

Hi,

You want to make yourself familiar with conjugate priors https://en.m.wikipedia.org/wiki/Conjugate_prior, especially Kevin Murphy's paper linked from that article ([5]) is helpful. From the table on wikipedia I might have exchanged the nu (v) with kappa.

celdorwow commented 3 years ago

Many thanks for the link. It's been extremely helpful. It is not a straight forward topic, and I feel it will take some time before I have a good grasp on = it ;)