Skip to content

Commit

Permalink
docs(typo): Fixed syntax errors (#250)
Browse files Browse the repository at this point in the history
* 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 <[email protected]>
  • Loading branch information
shanks847 and deepcharles authored Apr 12, 2022
1 parent 2bd37c2 commit 1c5ffbf
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions docs/user-guide/detection/pelt.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,19 +27,19 @@ 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"
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

<a id="Killick2012">[Killick2012]</a>
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.
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.

0 comments on commit 1c5ffbf

Please sign in to comment.