How can i plot a database of vectors

2 views (last 30 days)
Stefan Olaru
Stefan Olaru on 25 Jan 2015
Answered: Image Analyst on 25 Jan 2015
I have a database with 3 classes, class 1 =59 vectors, class 2:80, class 3 100. I want to plot those 3 classes of vectors(they have each 13 attributes) with different colors in same chart. Then i want to plot another vector with a different color in the same chart in order to figure out what is the nearest class to this vector. Is that possible?

Answers (1)

Image Analyst
Image Analyst on 25 Jan 2015
The vector is a list of wine ID numbers I guess. I think you can pick 3 of the 13 attributes and then plot all the vectors with scatter3(). You can pass in colors and sizes into scatter 3 so pick a different color and size for each of the 3 classes so you can tell each cluster apart once they're plotted on the scatterplot. I don't know how to do more than 3 classes (3 attributes plus the class label) since we can visualize in 3D but not 13D. So you can do 3 attributes at a time. So plot your cluster centroids in one color and size, and then all the indexes from that class in the same color but a smaller size. Repeat for the other two classes.
Here's a video for how to visualize or conceptualize up through the 10th dimension but honestly I get lost after about dimension 4 or 5. https://www.youtube.com/watch?v=JkxieS-6WuA

Community Treasure Hunt

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

Start Hunting!