<s>
In	O
statistics	O
and	O
signal	O
processing	O
,	O
step	B-Algorithm
detection	I-Algorithm
(	O
also	O
known	O
as	O
step	O
smoothing	O
,	O
step	O
filtering	O
,	O
shift	B-Algorithm
detection	I-Algorithm
,	O
jump	O
detection	O
or	O
edge	B-Algorithm
detection	I-Algorithm
)	O
is	O
the	O
process	O
of	O
finding	O
abrupt	O
changes	O
(	O
steps	O
,	O
jumps	O
,	O
shifts	O
)	O
in	O
the	O
mean	O
level	O
of	O
a	O
time	O
series	O
or	O
signal	O
.	O
</s>
<s>
It	O
is	O
usually	O
considered	O
as	O
a	O
special	O
case	O
of	O
the	O
statistical	O
method	O
known	O
as	O
change	B-General_Concept
detection	I-General_Concept
or	O
change	B-General_Concept
point	I-General_Concept
detection	I-General_Concept
.	O
</s>
<s>
The	O
step	B-Algorithm
detection	I-Algorithm
problem	O
occurs	O
in	O
multiple	O
scientific	O
and	O
engineering	O
contexts	O
,	O
for	O
example	O
in	O
statistical	O
process	O
control	O
(	O
the	O
control	B-General_Concept
chart	I-General_Concept
being	O
the	O
most	O
directly	O
related	O
method	O
)	O
,	O
in	O
exploration	O
geophysics	O
(	O
where	O
the	O
problem	O
is	O
to	O
segment	O
a	O
well-log	O
recording	O
into	O
stratigraphic	O
zones	O
)	O
,	O
in	O
genetics	O
(	O
the	O
problem	O
of	O
separating	O
microarray	O
data	O
into	O
similar	O
copy-number	O
regimes	O
)	O
,	O
and	O
in	O
biophysics	O
(	O
detecting	O
state	O
transitions	O
in	O
a	O
molecular	O
machine	O
as	O
recorded	O
in	O
time-position	O
traces	O
)	O
.	O
</s>
<s>
For	O
2D	O
signals	O
,	O
the	O
related	O
problem	O
of	O
edge	B-Algorithm
detection	I-Algorithm
has	O
been	O
studied	O
intensively	O
for	O
image	B-Algorithm
processing	I-Algorithm
.	O
</s>
<s>
When	O
the	O
step	B-Algorithm
detection	I-Algorithm
must	O
be	O
performed	O
as	O
and	O
when	O
the	O
data	O
arrives	O
,	O
then	O
online	B-Algorithm
algorithms	I-Algorithm
are	O
usually	O
used	O
,	O
</s>
<s>
By	O
contrast	O
,	O
offline	B-Algorithm
algorithms	I-Algorithm
are	O
applied	O
to	O
the	O
data	O
potentially	O
long	O
after	O
it	O
has	O
been	O
received	O
.	O
</s>
<s>
Most	O
offline	B-Algorithm
algorithms	I-Algorithm
for	O
step	B-Algorithm
detection	I-Algorithm
in	O
digital	O
data	O
can	O
be	O
categorised	O
as	O
top-down	O
,	O
bottom-up	O
,	O
sliding	O
window	O
,	O
or	O
global	O
methods	O
.	O
</s>
<s>
The	O
evidence	O
for	O
a	O
step	O
is	O
tested	O
by	O
statistical	O
procedures	O
,	O
for	O
example	O
,	O
by	O
use	O
of	O
the	O
two-sample	O
Student	B-General_Concept
's	I-General_Concept
t-test	I-General_Concept
.	O
</s>
<s>
Alternatively	O
,	O
a	O
nonlinear	O
filter	O
such	O
as	O
the	O
median	B-Algorithm
filter	I-Algorithm
is	O
applied	O
to	O
the	O
signal	O
.	O
</s>
<s>
Algorithms	O
include	O
wavelet	O
methods	O
,	O
and	O
total	B-Algorithm
variation	I-Algorithm
denoising	I-Algorithm
which	O
uses	O
methods	O
from	O
convex	O
optimization	O
.	O
</s>
<s>
When	O
there	O
are	O
only	O
a	O
few	O
unique	O
values	O
of	O
the	O
mean	O
,	O
then	O
k-means	B-Algorithm
clustering	I-Algorithm
can	O
also	O
be	O
used	O
.	O
</s>
<s>
Because	O
steps	O
and	O
(	O
independent	O
)	O
noise	O
have	O
theoretically	O
infinite	O
bandwidth	B-Algorithm
and	O
so	O
overlap	O
in	O
the	O
Fourier	B-Algorithm
basis	I-Algorithm
,	O
signal	O
processing	O
approaches	O
to	O
step	B-Algorithm
detection	I-Algorithm
generally	O
do	O
not	O
use	O
classical	O
smoothing	O
techniques	O
such	O
as	O
the	O
low	B-Algorithm
pass	I-Algorithm
filter	I-Algorithm
.	O
</s>
<s>
Because	O
the	O
aim	O
of	O
step	B-Algorithm
detection	I-Algorithm
is	O
to	O
find	O
a	O
series	O
of	O
instantaneous	O
jumps	O
in	O
the	O
mean	O
of	O
a	O
signal	O
,	O
the	O
wanted	O
,	O
underlying	O
,	O
mean	O
signal	O
is	O
piecewise	O
constant	O
.	O
</s>
<s>
For	O
this	O
reason	O
,	O
step	B-Algorithm
detection	I-Algorithm
can	O
be	O
profitably	O
viewed	O
as	O
the	O
problem	O
of	O
recovering	O
a	O
piecewise	O
constant	O
signal	O
corrupted	O
by	O
noise	O
.	O
</s>
<s>
There	O
are	O
two	O
complementary	O
models	O
for	O
piecewise	O
constant	O
signals	O
:	O
as	O
0-degree	B-Algorithm
splines	I-Algorithm
with	O
a	O
few	O
knots	B-Algorithm
,	O
or	O
as	O
level	B-Algorithm
sets	I-Algorithm
with	O
a	O
few	O
unique	O
levels	O
.	O
</s>
<s>
Many	O
algorithms	O
for	O
step	B-Algorithm
detection	I-Algorithm
are	O
therefore	O
best	O
understood	O
as	O
either	O
0-degree	O
spline	B-Algorithm
fitting	O
,	O
or	O
level	B-Algorithm
set	I-Algorithm
recovery	O
,	O
methods	O
.	O
</s>
<s>
When	O
there	O
are	O
only	O
a	O
few	O
unique	O
values	O
of	O
the	O
mean	O
,	O
clustering	O
techniques	O
such	O
as	O
k-means	B-Algorithm
clustering	I-Algorithm
or	O
mean-shift	B-Algorithm
are	O
appropriate	O
.	O
</s>
<s>
These	O
techniques	O
are	O
best	O
understood	O
as	O
methods	O
for	O
finding	O
a	O
level	B-Algorithm
set	I-Algorithm
description	O
of	O
the	O
underlying	O
piecewise	O
constant	O
signal	O
.	O
</s>
<s>
Many	O
algorithms	O
explicitly	O
fit	O
0-degree	B-Algorithm
splines	I-Algorithm
to	O
the	O
noisy	O
signal	O
in	O
order	O
to	O
detect	O
steps	O
(	O
including	O
stepwise	O
jump	O
placement	O
methods	O
)	O
,	O
but	O
there	O
are	O
other	O
popular	O
algorithms	O
that	O
can	O
also	O
be	O
seen	O
to	O
be	O
spline	B-Algorithm
fitting	O
methods	O
after	O
some	O
transformation	O
,	O
for	O
example	O
total	B-Algorithm
variation	I-Algorithm
denoising	I-Algorithm
.	O
</s>
<s>
All	O
the	O
algorithms	O
mentioned	O
above	O
have	O
certain	O
advantages	O
and	O
disadvantages	O
in	O
particular	O
circumstances	O
,	O
yet	O
,	O
a	O
surprisingly	O
large	O
number	O
of	O
these	O
step	B-Algorithm
detection	I-Algorithm
algorithms	O
are	O
special	O
cases	O
of	O
a	O
more	O
general	O
algorithm	O
.	O
</s>
<s>
where	O
I(S )	O
=	O
0	O
if	O
the	O
condition	O
S	O
is	O
false	O
,	O
and	O
one	O
otherwise	O
,	O
obtains	O
the	O
total	B-Algorithm
variation	I-Algorithm
denoising	I-Algorithm
algorithm	O
with	O
regularization	O
parameter	O
.	O
</s>
<s>
leads	O
to	O
the	O
mean	B-Algorithm
shift	I-Algorithm
algorithm	O
,	O
when	O
using	O
an	O
adaptive	O
step	O
size	O
Euler	O
integrator	O
initialized	O
with	O
the	O
input	O
signalx	O
.	O
</s>
<s>
Here	O
W>0	O
is	O
a	O
parameter	O
that	O
determines	O
the	O
support	O
of	O
the	O
mean	B-Algorithm
shift	I-Algorithm
kernel	O
.	O
</s>
<s>
leading	O
to	O
the	O
bilateral	B-Algorithm
filter	I-Algorithm
,	O
where	O
is	O
the	O
tonal	O
kernel	O
parameter	O
,	O
and	O
W	O
is	O
the	O
spatial	O
kernel	O
support	O
.	O
</s>
<s>
specifying	O
a	O
group	O
of	O
algorithms	O
that	O
attempt	O
to	O
greedily	O
fit	O
0-degree	B-Algorithm
splines	I-Algorithm
to	O
the	O
signal	O
.	O
</s>
<s>
A	O
classical	O
variational	O
method	O
for	O
step	B-Algorithm
detection	I-Algorithm
is	O
the	O
Potts	O
model	O
.	O
</s>
