How to be able to plot all the data in Matrix and the the mean of matrix in Matlab?

3 次查看(过去 30 天)
I want to plot my data for PCA.
For ex/ I have 100*50 matrix.
Im now sure, but may be we can consider the column as the features (features = 50).
And for the row, I may be the training data.
So we have 100 training data/image. And I also have mean from my initial matrix.
So, now, Im going to plot each data(100) for every feature (50) and also the mean at the same figure.
Can u please help me solve this Master ;)
I really appriciate any help
  2 个评论
Image Analyst
Image Analyst 2014-2-17
Attach your image with the image icon. All I got from your link was the French Google that appeared to be asking me something in French about cookies. And define exactly what you mean by "plot" when you're talking about an feature matrix. Do you mean like you want to plot every row of the matric as a curve or bar chart or what??? What is the mean? It doesn't make sense to take the mean of different measurements unless those measurements are related. For example, if my features are area, perimeter, mean intensity, and centroid, it makes no sense to average those numbers together.
When you say "the mean at the same figure" do you mean the mean for the same image? Or do you mean you want a figure (GUI) with the means all printed in a table on that figure?
Tanya
Tanya 2014-2-17
Hii..
Here is my code
[a,InputMatrix] = sort(rand(100,50)); %ROW=100 COLUMNS=50
Average=mean(InputMatrix);
[CovarianceMatrix]= cov(InputMatrix);
[EigVector,EigValue] = eigs(CovarianceMatrix);
From that code, I have 100 rows and 50 columns.
Im going to do PCA for mechine learning.
So I have to reduce the dimensionality of my data (in this case represents by a matrix).
I dont know exactly what is column and row of matriks represent as. But I guess, the Column will be as the kind of features and the Row will be the training data.
I already calculate the mean of my input matrix. And the are eigenvector 1 & eigenvector2. Which are the first and second colomn of EigVector
And know, I have to visualize my matrix, the mean, and the eigenvector (as a line) in 2D space in the same figure (at one figure).
How to do that??

请先登录,再进行评论。

回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Dimensionality Reduction and Feature Extraction 的更多信息

产品

Community Treasure Hunt

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

Start Hunting!

Translated by