Periodic Data with Machine Learning (Like Degree Angles -> 179 is 2 different from -179)

后端 未结 4 1414
执念已碎
执念已碎 2021-02-02 02:52

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 no

4条回答
  •  一生所求
    2021-02-02 03:42

    You need to use the mod function. In straight python this would be (ang2-ang1)%360 but with scipy it looks like you can use numpy.mod() - see the documentation.

提交回复
热议问题