3-Dimensional Clustering

25 views (last 30 days)
Tyler Smith
Tyler Smith on 14 Aug 2018
I have a 3D matrix (73 X 144 X 25738) where the first 2 dimensions are data in a lat / long grid and the 3rd dimension is time. I have transformed the data so that it is Boolean, where all 1's are the data points that meet a criteria and every other cell has a 0. I need suggestions on how to group/cluster the data by closeness in the first 2 dimensions (aka: the cells with 1's should be contiguous or within a specified distance - 2 cells would be grouped if they were both 1's and were touching/adjacent within the 2D (73 x 144) array). Furthermore, I need to maintain the 2D groups/clusters through time (aka: if there is a cluster of 5 cells on Day 1 at a given lat/long and a cluster of 8 cells around the same lat/long values on Day 2, I would like to be able to identify that the cluster of 8 cells on day 2 belongs to the same cluster as day 1). Thanks for any suggestions.
  3 Comments
Tyler Smith
Tyler Smith on 20 Jun 2019
One thing I found to be close but not quite what I was looking for:
Ultimately I ended up identifying local maximums by summing the 3D matrix I wanted to cluster. This showed me where potential regions may be. I then turned the local maximums into single grid points by calculating the weighted centroid (max_centroids) based on the area of each lat/long grid cell. The I used correlations between all the vectors in the lat/long matrix and the vectors identified by the max_centroids to produce a rough regionalization/clustering of my timeseries data. This was entirely case specific, so a similar approach may or may not work for you.
regmax = imextendedmax(Data,50);
max_centroids = regionprops(regmax,gridpoint_area,'WeightedCentroid');
Prelim_Regions.png
Pauline Combarnous
Pauline Combarnous on 21 Jun 2019
Thank you but indeed that's not quite what I was looking for, even thougth your method is interesting. I think I can find a solution using the linkage and cluster functions, I'm just trying to figure out how I could put different cutoffs on the cluster function along the different directions (lat/long and time). Anyway, thanks for your quick answer.

Sign in to comment.

Answers (0)

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!