# Finding point of interest in time series data

I am working on a project where I need to figure out the point of interest in time series data.

From the picture you can probably understand a bit more what I mean. Basically, imagine this is the electricity consumption of a washing machine. From this, I want to identify these points where the consumption changes drastically. In this way I will be able to identify more or less what the machine is doing.

I only have raw data so I can't use any supervised learning algorithm, I was wondering if there are ways to do it mathematically without spending too much computation time.

• Can't we just extract data from its x-value? – Idonknow May 27 at 11:53
• What do you mean? This is just an example, curves can be different of course. – GhzNcl May 27 at 13:20

Try derivative after either a low-pass filter or smoothing (probably exponential smoothing) to cut down on the noise. Big changes result in a big derivative (up or down).

• Sounds good. I understand the low-pass filter and smoothing part but how would I tackle the derivative part? Because I do not have a function representing the curve but just raw data: time, value. Thanks a lot. – GhzNcl May 28 at 9:03
• What software is being used to plot the data? Most languages will have one or more ways built-in. – C8H10N4O2 May 28 at 15:16
• I am doing everything in Python. I am plotting using Matplotlib. – GhzNcl May 28 at 22:51

According to your examples, a bunch of ifs should do. A rough version of the logic, in python code, could be this:

  last_seen_point_of_interest_time = float('-inf')
last_value = 0
last_time = None
for value, time in curve_points:
level_change = math.abs(value - last_value) > 0.4
last_point_was_a_while_ago = time - last_seen_point_of_interest_time > threshold
if level_change and last_point_was_a_while_ago:
mark_point_of_interest(last_value, last_time)
last_seen_point_of_interest_time = time
last_value = value
last_time = time