You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'd like to cluster my vector maps with k-means in time. My number of samples are thus my number of timesteps and the featurevector are the u and v vectors for all pixels. Like this, I cannot use the information that u and v are a couple at each point in space, I just stack them behind each other. sklearn.Kmeans doesn't allow for a third dimension.
The text was updated successfully, but these errors were encountered:
you have to reshape or flatten the array to use it with K-means. It (and most scikit-learn functions) take only 2D input. The first dimension is the number of observations and the second is the feature.
In this example: https://www.kaggle.com/kmader/k-means-clustering-on-neurons
We reshape the 2D+time (WHT) image into (W*H, T) meaning each pixel is an observation and the feature is the time series.
In some of the examples in the lecture (advanced segmentation), we added the x and y position of the pixel as a feature so it could group regions together (ultimately leading to super pixels) You probably want to use U and V as the feature and possibly add x and y if it makes sense.
I'd like to cluster my vector maps with k-means in time. My number of samples are thus my number of timesteps and the featurevector are the u and v vectors for all pixels. Like this, I cannot use the information that u and v are a couple at each point in space, I just stack them behind each other. sklearn.Kmeans doesn't allow for a third dimension.
The text was updated successfully, but these errors were encountered: