Clear Filters
Clear Filters

What does the z axis mean in kmeans, pca and tsne? what data does it add that 2d doesn't? what do the axis represent?

3 views (last 30 days)
The context is as follows: I have data that has been plotted in a 2D graph on the left, and in a 3D graph on the right, using k-means clustering. However, I am unsure of what information the third dimension (z-axis) adds to the data, and what the x and y axes are measuring. The data itself consists of numerical columns extracted from an Excel sheet, measuring attributes such as area and circumference. While this data alone does not provide much insight, k-means clustering can generate graphs such as these, and I am unsure how to interpret them. Specifically, I would like to know what the third dimension adds to the 2D graph, and what additional information k-means clustering in 3D provides compared to 2D. Furthermore, I would like to understand what each of the x, y, and z axes represent in these graphs.
What does the z axis mean in kmeans, pca and tsne?
what data does it add that 2d doesn't?
what do the axis represent?
How can I convert the axis to square microns?
  14 Comments
Neo
Neo on 3 Mar 2023
I think this is an interesting question, please check out my question that is asking something similar:
I performed pca first then performed kmeans in a 3d plot, but i also got the same thing in a 2d plot (instead of spheres it was circles) but it appears everything else to be the same. Are these two different plots? What does the z component add?
Torsten
Torsten on 3 Mar 2023
What do you mean by: I performed kmeans in a 3d plot, but i also got the same thing in a 2d plot ?
Can you share a simple example for illustration purposes ?

Sign in to comment.

Answers (1)

the cyclist
the cyclist on 1 Mar 2023
All 2-dimensional plots in MATLAB can be rotated to be viewed from a different "point of view", but this is generally not useful (or worse) if the data don't have a z-component.
x = randn(50,1);
y = randn(50,1);
figure
scatter(x,y)
figure
scatter(x,y)
view(45,45)
  1 Comment
Laura
Laura on 2 Mar 2023
The context is as follows: I have data that has been plotted in a 2D graph on the left, and in a 3D graph on the right, using k-means clustering. However, I am unsure of what information the third dimension (z-axis) adds to the data, and what the x and y axes are measuring. The data itself consists of numerical columns extracted from an Excel sheet, measuring attributes such as area and circumference. While this data alone does not provide much insight, k-means clustering can generate graphs such as these, and I am unsure how to interpret them. Specifically, I would like to know what the third dimension adds to the 2D graph, and what additional information k-means clustering in 3D provides compared to 2D. Furthermore, I would like to understand what each of the x, y, and z axes represent in these graphs. @the cyclist

Sign in to comment.

Community Treasure Hunt

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

Start Hunting!