Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

More explanation on how the variables work #24

Open
casaltenburg opened this issue Jan 11, 2022 · 0 comments
Open

More explanation on how the variables work #24

casaltenburg opened this issue Jan 11, 2022 · 0 comments

Comments

@casaltenburg
Copy link

Hi there,

Are you guys still active? I did something similair to your example (see code below).
But my result(image below) is not what I want. I only want to detect the big change.
I think I have to change the variables, but I have no idea why and how.
Can you guys help me and explain it in an easy way?

bc = bocd.BayesianOnlineChangePointDetection(bocd.ConstantHazard(250), bocd.StudentT(mu=0, kappa=1, alpha=1, beta=1))

rt_mle = np.empty(raw_signal.shape)
for i, d in enumerate(raw_signal):
    bc.update(d)
    rt_mle[i] = bc.rt

plt.figure(figsize=(20, 10))
plt.plot(raw_signal, alpha=0.5, label="observation")
index_changes = np.where(np.diff(rt_mle)<0)[0]
plt.scatter(index_changes, raw_signal[index_changes], c='green', label="change point")

image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant