I have a group of lists detailing temperatures over differing amounts of time. My goal is to use machine learning to identify periods in which a machine is turned on and off, where turning on the machine drastically increases temperature, and turning off the machine returns it to idle temperature.

The rub is that there is a level of temperature inertia- take the following example.

Among my control data is the following list (truncated for simplicity's sake):

At minute intervals, the temperature starts at 73 degrees. It is turned off after 12 minutes, when the temperature is 83 degrees. However, the peak is reached 3 minutes after the stopping point, at 86 degrees.

Given a control group of a list with labelled starts, ends, and peaks, how would I go about using supervised learning to create an algorithm that could predict stops using a list with only starts and peaks?

  • 1
    $\begingroup$ Interesting problem. Is there a way to calculate the "theoretical" temperature at a certain point using physics laws when the machine is on? $\endgroup$
    – Erwan
    Jan 26, 2020 at 23:44
  • $\begingroup$ I've created a derivative function that creates a polynomial derivative to the 20th degree in between the start and peak locations. This offers a fairly precise estimation of what the active temperature is at any given time frame. I'm not sure what laws could act as constraints in this environment, but I looked to see if the maximum slope between two data points was constant, but unfortunately it varies by a significant amount. $\endgroup$
    – iwillc123
    Jan 27, 2020 at 1:47

2 Answers 2


There are two popular approaches:

  1. Model it with traditional supervised binary classification algorithms (e.g., logistic regression or Random Forest) and generate features (e.g., look back 1 steps, look back 2 steps, …)

  2. Model it with a Hidden Markov Model (HMM). The hidden state is the machine on or off. The observed state is temperature. Given the observed state, what is the most likely hidden state that would generate it?


since this is basically time series data, you could create an LSTM network with a dense output layer for binary classification. assuming that your time series data is bound, you would first need to normalize it, make it stationary if not and simply train a univariate LStm model on your data.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.