I have a data matrix of 510x6 and want to perform K-means cluster analysis on this. I am having problem in plotting all the different clusters in 2 dimensions. Is it not possible to plot 6 different clusters in 2 dimensions?
相关问题
- Extract matrix elements using a vector of column i
- How do you get R's null and residual deviance
- How to display an image represented by three matri
- OpenCV - Is there an implementation of marker base
- Avoid copying an array when using mexCallMATLAB
相关文章
- How do I append metadata to an image in Matlab?
- How to pick the T1 and T2 threshold values for Can
- How can I write-protect the Matlab language?
- `std::sin` is wrong in the last bit
- Escape sequence to display apostrophe in MATLAB
- Vertical line fit using polyfit
- Reading .mat file using C: how to read cell-struct
- Is it possible to compare 3D images?
Let's start by looking at some data which is 150x4 and try and split that into 6 different clusters. The fisheriris dataset has four columns (yours has 6), which correspond to sepal length, sepal width, petal length and petal width and can be loaded into MATLAB like this:
We can then break the data down into six clusters with:
Given that we have four pieces of information for each data point, in order to visualise each cluster we need to choose what we want to look at. For example I might want to look at the clusters for sepal length against sepal width. These are the first two columns and I can see them with:
If I want to look at columns at once, we need to go up a dimension:
Your data has six dimensions so it is even harder to get a sense of the clusters visually. You could have a go at doing something similar to the
plotmatrix
function: