I am looking into whether a neural network is appropriate to detect "points of interest" (POI) in a set of tuples (say length, and some sensor value). A POI is essentially a quick change in the value which doesn't follow the pattern. So if we have a linear increase in the sensor value and then it suddenly jumps by 200% that would be a POI.
Here is an example of the data I am working with:
[(1,10),(2,11),(3,14),(5,24),(6.5,25), (7,26), (8,45)]
In this example lets say "(3,14)", "(5,24)", and "(8,45)" are points of interest. So I am trying to design a neural network which will detect these.
I have started by creating a Convolution 1D layer with a static input length of 500 elements.
After a couple hidden layers I apply a sigmoid function which provides a list of 0s and 1s as output where 1s signify a POI in the set.
There are a couple of issues with this approach which I am trying to solve.
In a categorical loss function an output of [1,0,0,1,0,0]
for example would be seen as completely inaccurate if the expected output is [0,1,0,0,1,0]
whereas in reality that is fairly accurate since the predicted POIs are very close to the real POIs.
So what I am trying to do is find a loss function to optimize the neural network.
So far I have tried:
- Binary Cross Entropy: I read this is good for classifying where inputs can belong to multiple classes. I tried this out thinking each POI is essentially a "category". But this seems to not work and I assume it's because of what I noted above.
- Mean Absolute Error: This seems to have gotten slightly better results but after closer inspection it didn't seem very accurate and would mostly uniformly predict POIs on a set.
I have tried a few others without much luck.
What loss function would be more appropriate for this?
One other output I tried was instead of outputting 0s and 1s it should just return the indexes of the points of interest so say 3, 5 8. Would this be a better output?