-
Notifications
You must be signed in to change notification settings - Fork 161
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
example setting the penalty parameter? #4
Comments
Hello, Finding a proper value for the T, d = signal.shape # number of samples, dimension
sigma = ... # noise standard deviation
bic = sigma*sigma*np.log(T)*d
algo = rpt.Pelt().fit(signal)
my_bkps = algo.predict(pen=bic) However, BIC tends to produce too low penalty values. When that happens, the simplest procedure, is to test several values, as below: pen_values = np.logspace(0, 3, 10) # for instance
algo = rpt.Pelt().fit(signal)
bkps_list = [algo.predict(pen=pen) for pen in pen_values]
# then compare elements of bkps_list Cheers, Charles |
Hello thanks for sharing the BIC theory, however, could you please let me know why the way you calculate BIC is bic = sigmasigmanp.log(T)*d ? In the Wiki, i could not find such derivation. Thanks! |
Hello, There might be a mistake indeed. The formula should be This is only valid for the cost function |
oh it is not in the docs yet, never mind then. |
Hello, Thanks a lot for this very useful package! Is there any trick to set a good penalty value (or at least a sense of scale)? |
Is there an example about how to set the pen parameter for Pelt?
The text was updated successfully, but these errors were encountered: