I'm using a sliding window to obtain features (like mean, varianve etc) of a labelled time series of sensor readings. The goal is to train a binary classifier (like linear regression or SVM) to detect the 'event'(green) labelled parts of the data.
The problem is that I don't know how to handle windows that contain some green and some blue labels. My current approach is to set a threshold at which a window is taken as 'event'. For example if more than 90% of the step labels are 'event', then the whole window is considered as 'event', otherwise it is 'no event'. In the plot:
- window a) covers 100% step labels 'event' => considered as 'event'
- window b) covers 60% 'event' which is below 90% threshold => considered as 'no event'
- window c) covers 0% 'event' => considered as 'no event'
Does that make sense or is there a better way? Do you have any suggestions?
I have to admit that I'm new to this field and I don't even know the proper technical terms for this kind of problem. Thank you and best regards