I m new in the domain of machine learning. I m here to ask for some elucidation. I have a data set presented as a time series( from a strain sensor coming from a wind turbine). In this time series, we can capture stop and start as u can see in the attached figure . I would like to know. which type of layer should I use? is it possible to make a model that counts up the start and stop of the signal(output dimension = 2)? Until now I just did classification using conv1D and the classes are (there is a stop, there is a start, there is nothing) but this way proceed is not convenient since sometimes we can have a rotor stop and start. I already thanks you a lot for your help,
Counting of events is probably best done as a separate software component that takes the output of your event classifier. The event classifier model would output for each time-step two probabilities: one for started and one for stopped.
The easiest way to count the events to have a state machine that compares the probabilities against a fixed threshold to create discrete events. And once you have discrete events, counting is trivial. Pseudo-code below:
# returns a tuple with (new_state, event_name) # event_name can be None if no event occurred def next_event(state, start_prob, stop_prob): start_threshold = 0.5 stop_threshold = 0.5 if state == 'running': if stop_prob > stop_threshold: return ("parked", "stop") if state == 'stopped' or state == 'unknown': if start_prob > start_threshold: return ("running", "start") return (state, None) # no change ... # initialization start_counts = 0 state = 'unknown' ... # for every new time window X event_prob = model.predict(X) state, event = next_event(state, event_prob, event_prob) if event is not None and event == 'start': start_counts += 1 ....