# Gaussian Mixture Model with Custom Distance Metric

I have some 1D data that I want to cluster using Mixture of Gaussian. However, the data "wraps around" at two extremes. Specifically, I have a list of angles from $-\pi$ to $\pi$ and the data near two ends should actually be close to each other. Thus, if I just use GMM naively I will get very poor result. So is there a way to make the learning algorithm aware of this kind of distance metric? Any theory or practical methods are appreciated. I am using Python's scikit-learn so it would be great if it supports it natively. However, I did not find such feature. Last, if anyone know of any general method to deal with any distance metric between high-dimensional data points, some references are also great.

Thanks.

• Why can't you cluster 1D data "by hand"? – Artem Sobolev Feb 28 '15 at 10:10
• In case of a general dimension, take a look at von Mises distribution. There are papers on von Mises Clustering, like this one. Unfortunately, I don't know if any of them are implemented in any software toolkits. – Artem Sobolev Feb 28 '15 at 10:12
• @Barmaley.exe What do you mean "by hand"? I am writing a program in which clustering is part of it. – zyl1024 Feb 28 '15 at 20:24