Issue I'm trying to solve has to do with data representation/preprocessing. I have a 2-D numpy array which has been populated with angle values between the interval [ 0 , 2pi ]. Only problem is, there are alot of instances of NaN values which I replaced with the value of 0.
In the end, i plan to use this data in a deep learning network, so you can imagine the issue this is causing during learning. The representative value of the NaN (the zero) is unfortunately equivilent to the angles 0 and 2pi. I can't just choose any other value for the NaN as this can become representative of an angle in my loss function as well.
Currently, I'm using the following loss: 2-2*cos(AngleGroundTruth-AnglePredict).
I would appreciate any advice in tackling this problem.
Edit: The spatial positions in the 2-D matrix matter, so I can't just remove the NaNs and resize the matrix. This importance on the spatial positions is why I replaced the NaNs with zero