Periodic Data with Machine Learning (Like Degree Angles -> 179 is 2 different from -179)
Another simpler way could be to use time as angle measurements than degree measurements (not DMS though). Since many analytics software features time as a datatype, you can use its periodicity to do your job.
But remember, you need to scale 360 degrees to 24 hours.
I'm using Python for kernel density estimations and gaussian mixture models to rank likelihood of samples of multidimensional data.
Every piece of data is an angle, and I'm not sure how to handle the periodicity of angular data for machine learning.
First I removed all negative angles by adding 360 to them, so all angles that were negative became positive, -179 becoming 181.  I believe this elegantly handles the case of -179 an similar being not significantly different than 179 and similar, but it does not handle instances like 359 being not dissimilar from 1.  
One way I've thought of approaching the issue is keeping both negative and negative+360 values and using the minimum of the two, but this would require modification of the machine learning algorithms.
Is there a good preprocessing-only solution to this problem?  Anything built into scipy or scikit?
Thanks!