TIME SERIES ANALYSIS / TA LAB

Suspicious point, or real signal?

Predict what will change. Move one slider. Make a case for what to keep.

One spike + changing baseline

Observed

Start with the observations. Turn on Show detection to reveal what the rule flags.

“Flagged → gaps” makes a separate working copy. The observations remain unchanged.

Pause & explain

Keeps input, flags, gaps and estimates in separate columns.
Reproduce the current settings in Python

Download the experiment CSV above, then run this code in the same folder. It recalculates from the input column; the reference values are never used to fit the method.

Teaching notes & calculation choices

Begin with Show detection off to discuss the raw series. Turn it on to reveal the flags and counts. Show envelope controls the limits separately. Turning detection off preserves your settings and removes all detection overlays; exports contain no flags or removals while it is off.

Fixed thresholds flag values below your lower limit or above your upper limit, with either side optional. There is no rolling calculation. The starting limits are suggestions from the displayed data; you can change them with the sliders or type exact values. They stay fixed when you change a synthetic event's height or length.

  1. Start with one spike: compare SD and MAD, then increase the spike height.
  2. Use the cluster: make the window shorter than the event, then much longer. Try a whole-record reference.
  3. Use the stuck sensor or challenge D: turn on repeated-value detection. Why can a plateau escape a statistical envelope?
  4. Try the genuine level shift: a flag does not establish that the data is wrong.
  5. Send flags to the gap stage, or use the temperature gaps. Predict before revealing the held-out original.

The challenge files have no supplied ground-truth labels. Only synthetic examples show known injected faults. Course excerpts retain their original spacing; the whole-record option uses that excerpt, not the full CSV.

SD uses n − 1. Quartiles use linear interpolation. MAD is computed around the median of each same window, then multiplied by 1.4826. Zero spread gives a collapsed envelope: any unequal value outside it is flagged. Equality with a limit is not flagged. A run rule uses the entire consecutive run and can use future readings, even with a trailing envelope.

The cubic option uses a natural cubic spline with zero second derivative at the first and last available observations. This differs from the default boundary conditions of the notebook’s interpolate(method='cubic'). It may overshoot. No method uses the held-out reference.

RMSE = square root of the average squared error, evaluated only where the input was missing and a finite estimate and reference are available. Check coverage before comparing methods. It cannot be measured for genuinely unknown values.

Challenge 1 · import the files · Challenge 2 · clean the data · Filling missing values