I don't see an array of four-dimensional vectors. As such, it is not clear which numbers group together as a single observation. An array of n-dimensional vectors would, as a whole, have a dimension of 2 and should be processed by KNN.
I see a four-dimensional array of numbers. That's something quite different.
On Feb 27, 2017 7:43 PM, Rohan Koodli <[email protected]> wrote:
I'm having trouble understanding how to cluster multidimensional data. Specifically, a 4 dimensional array.test = [[[[3,10],[1,5],[3,18]],[[3,1],[0,0],[0,0]],[[3,3],[1,5],[0, 0]]],[[[1,5],[2,7],[0,0]],[[1, 7],[0,0],[0,0]],[[0,0],[0,0],[ 0,0]]]] from sklearn import mixture gmm = mixture.GMM() gmm.fit(test)The code returns the following error:"Found array with dim 4. GMM expected <= 2."Do I need to change the way my data is formatted? Is there a way of doing clustering on 4 dimensional data?
_______________________________________________ scikit-learn mailing list [email protected] https://mail.python.org/mailman/listinfo/scikit-learn
