From 1c5ffbfbe97954c52507b67fd4592997d263ca50 Mon Sep 17 00:00:00 2001 From: Shankar Ramharack Date: Tue, 12 Apr 2022 03:48:17 -0400 Subject: [PATCH] docs(typo): Fixed syntax errors (#250) * Fixed syntax errors The breakpoint variable, 'bkps' was mispelt to 'b' in the line that instantiates a pieces wise constant function. Also the plotting function has extra brackets and a comma around the ax variable which resulted in an integer iteration error. * docs: style Co-authored-by: Charles T --- docs/user-guide/detection/pelt.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/docs/user-guide/detection/pelt.md b/docs/user-guide/detection/pelt.md index 50cc97f5..509e57bb 100644 --- a/docs/user-guide/detection/pelt.md +++ b/docs/user-guide/detection/pelt.md @@ -27,7 +27,7 @@ import ruptures as rpt # creation of data n, dim = 500, 3 n_bkps, sigma = 3, 1 -signal, b = rpt.pw_constant(n, dim, n_bkps, noise_std=sigma) +signal, bkps = rpt.pw_constant(n, dim, n_bkps, noise_std=sigma) # change point detection model = "l1" # "l2", "rbf" @@ -35,11 +35,11 @@ algo = rpt.Pelt(model=model, min_size=3, jump=5).fit(signal) my_bkps = algo.predict(pen=3) # show results -fig, (ax,) = rpt.display(signal, bkps, my_bkps, figsize=(10, 6)) +fig, ax_arr = rpt.display(signal, bkps, my_bkps, figsize=(10, 6)) plt.show() ``` ## References [Killick2012] -Killick, R., Fearnhead, P., & Eckley, I. (2012). Optimal detection of changepoints with a linear computational cost. Journal of the American Statistical Association, 107(500), 1590–1598. \ No newline at end of file +Killick, R., Fearnhead, P., & Eckley, I. (2012). Optimal detection of changepoints with a linear computational cost. Journal of the American Statistical Association, 107(500), 1590–1598.