Detecting events in time series data

I am collecting data from a sensor over time, and I'm trying to figure out how to detect "events" in the data - specifically, when a given event begins and ends. The frequency, duration, and amplitude of these events varies.

Rather than using some rules-based scheme that proves to be rather ineffective, I want to train a model to detect these events for me. An example of my data (in only one dimension; I have multiple variables that I'm reading) looks like this:

There's one event here and some baseline data on either side.

My raw data before and during this event looks like:

1/1/2016 12:48:03   14.2
1/1/2016 12:48:04   12.8
1/1/2016 12:48:05   13.6
1/1/2016 12:48:06   13.5
1/1/2016 12:48:07   12.9
1/1/2016 12:48:08   15
...
1/1/2016 12:48:34   27.7
1/1/2016 12:48:35   30.3
1/1/2016 12:48:36   31
1/1/2016 12:48:37   32.8
1/1/2016 12:48:38   31.1
1/1/2016 12:48:39   28.7
1/1/2016 12:48:40   32.1
...


I have training data consisting of raw readings and timestamps that I can correlate to a truthset of event start and end times, but I don't know how I should go about featurizing to build a model. I assume I would keep a window of, say, 30 seconds or a minute of readings. (Events are typically more than a minute long, but I don't know whether I would need my window to contain the entire event.)

I'm familiar (but not an expert) with regression and boosted trees, and I know of tools that can generate code I can use without third-party libraries. But I don't know whether these are feasible approaches to solving my problem.

How can I go about detecting these events?

Edit: After some discussion, I've created the following graph to show what more data might look like from different signals. The duration of the manually labeled event is in blue (using the right axis labeled 0/1). Three signals show up strongly:

• Red covers the overall event reasonably well and is essentially the above example
• Purple-blue has an even stronger signal but only for the first half or so of the event
• Yellow-green has a stronger signal than reed for maybe a third of the event, but basically after purple-blue dies off.

Some signals (eg, the bottom-most orange on the left side) have an increase during the event. These either have a weak signal that should be captured or have no signal; however, it's not obvious whether any correlations between these signals and events exist, and if so, how to extract them.

• I am not sure what is your objective. Detecting event when it starts and ends? While reading or after the measurements are done? Some moving average or derivative grows fast for this event, if you have a baseline (something like mean) without event points for thresholding it makes the job done. The moving average should be a bit wider than possible fluctuations (like ~12:49:45) to avoid triggering false positive. – Evil Jul 30 '16 at 20:40
• Yes, I'm trying to figure out when the events start and end. At a minimum, after the fact. Realtime would be nice, but not necessary. I can get a rough idea of a baseline, but eventually, my hope is to be able to detect different kinds of events from different sensors, which each may have a different baseline and signature for their events. – FetchLaVache Jul 30 '16 at 22:27
• Could you give some broader context? Is the characteristic of events repeatable? Are sensors detecting the same event or unreleated? Baselines are different among the sensors, but taking one sensor could you estimate baseline? And the most important part - you want to have some detector, that will detect events for you, what more do you know about data? Those ineffective, discarded schemes - what rules have you used and what went wrong? Maybe it is salvageable? – Evil Jul 30 '16 at 22:42
• The events eventually should be detected with a multi-class classifier, though the multiple classes are relatively similar and could be bucketed as one for now. The durations have a limited range (say, 30sec - 5min) but won't ever be 3sec or 20min long, for example. The rule-based system gets a lot of false-positives and -negatives, and therefore requires a lot of manual review. It also only makes use of one variable instead of multiple, and there's no clear way to improve this to a multi-class system. – FetchLaVache Jul 30 '16 at 23:16
• Usually these kinds of machine learning approaches require some understanding of the application domain and what sorts of signals might indicate an event. Please give us some intuition from your application context: if you were going to try to find an event by eye, what kinds of patterns would you look for? What effects does an event might have on the observed values? – D.W. Jul 31 '16 at 3:28