Piecewise constant (pw_constant)#
Return a piecewise constant signal and the associated changepoints.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
n_samples |
int
|
signal length |
200
|
n_features |
int
|
number of dimensions |
1
|
n_bkps |
int
|
number of changepoints |
3
|
noise_std |
float
|
noise std. If None, no noise is added |
None
|
delta |
tuple
|
(delta_min, delta_max) max and min jump values |
(1, 10)
|
seed |
int
|
random seed |
None
|
Returns:
Name | Type | Description |
---|---|---|
tuple |
signal of shape (n_samples, n_features), list of breakpoints |
Source code in ruptures/datasets/pw_constant.py
8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 |
|