m
Line 20: Line 20:
  
 
**answer here
 
**answer here
 +
Hi Gupta, in Matlab, I use 'plot' function (instead of 'surf') twice and put 'hold on;' command between them.
 +
Suppose that you have generated samples of 2 classes:
 +
samples_1 = mvnrnd(mu1,SIGMA1,nsample1); and samples_2 = mvnrnd(mu2,SIGMA2,nsample2);
 +
 +
then for 2D case
 +
 +
plot(samples_1(:,1),samples_1(:,2),'or');
 +
 +
hold on;
 +
 +
plot(samples_2(:,1),samples_2(:,2),'ob');
 +
 +
for 3D case
 +
 +
plot3(samples_1(:,1),samples_1(:,2),samples_1(:,3),'or');
 +
 +
hold on;
 +
 +
plot3(samples_2(:,1),samples_2(:,2),samples_2(:,3),'ob');
 +
 +
yung-yao chen
 
----
 
----
 
[[Hw1_ECE662_S12|Back to hw1 ECE662 Spring 2012]]
 
[[Hw1_ECE662_S12|Back to hw1 ECE662 Spring 2012]]
  
 
[[2012_Spring_ECE_662_Boutin|Back to ECE662 Spring 2012 course page]]
 
[[2012_Spring_ECE_662_Boutin|Back to ECE662 Spring 2012 course page]]

Revision as of 10:54, 12 February 2012


Discussion page for First Homework, ECE662, Spring 2012

  • If you are not sure what to do, you may take a look at the statement of the second question in hw1, Spring 2008. But please feel free to deviate, as we discussed in class. -pm
  • I was hoping that some of the guys who volunteered to put information about data acquisition would have done so. Could you please post some links guys?
    • Please visit http://www.kdnuggets.com/datasets/ It is the website with the most number of interesting datasets that i have seen. Just to mention some:
      • Email dataset from Enron,
      • Cancer Program Data Sets from Broad Institute,
      • Yahoo Sandbox Dataset,
      • UC Irvine Machine Learning Repository.
  • In case you are having trouble generating multivariate normal data, here is a page explaining how to do it. -pm
  • Write comment/question/advice here

Question: I can generate multivariate normal data for 'w' classes. I am not sure how to plot them together with different colors. eg.: For 'w' = 2, I can plot both the dataset on same surf plot but it is the same colormap. Is it possible to have two color which can help in distinguishing two classes? [--Gupta101 13:29, 12 February 2012 (UTC)]

    • answer here

Hi Gupta, in Matlab, I use 'plot' function (instead of 'surf') twice and put 'hold on;' command between them. Suppose that you have generated samples of 2 classes: samples_1 = mvnrnd(mu1,SIGMA1,nsample1); and samples_2 = mvnrnd(mu2,SIGMA2,nsample2);

then for 2D case

plot(samples_1(:,1),samples_1(:,2),'or');

hold on;

plot(samples_2(:,1),samples_2(:,2),'ob');

for 3D case

plot3(samples_1(:,1),samples_1(:,2),samples_1(:,3),'or');

hold on;

plot3(samples_2(:,1),samples_2(:,2),samples_2(:,3),'ob');

yung-yao chen


Back to hw1 ECE662 Spring 2012

Back to ECE662 Spring 2012 course page

Alumni Liaison

Sees the importance of signal filtering in medical imaging

Dhruv Lamba, BSEE2010