(5 intermediate revisions by 3 users not shown)
Line 1: Line 1:
 
[[Category:2010 Spring ECE 662 mboutin]]
 
[[Category:2010 Spring ECE 662 mboutin]]
  
=ECE662 hw1 related discussions=
+
=[[Hw1_ECE662Spring2010|ECE662 Spring 2010, hw1]] related discussions=
 
+
This homework (see original statement [[Hw1_ECE662Spring2010|here]]) is a freeform exercise that consists in applying Bayes decision rule to Normally distributed data. The next homework will consists in a peer review of this homework.
 
+
----
 +
----
 
Here is a link to a lab on Bayes Classifier that you might find helpful. Please use it as a reference.
 
Here is a link to a lab on Bayes Classifier that you might find helpful. Please use it as a reference.
 
*http://www.nada.kth.se/kurser/kth/2D1431/2005/lab2.pdf
 
*http://www.nada.kth.se/kurser/kth/2D1431/2005/lab2.pdf
 
Enjoy, Raj..
 
Enjoy, Raj..
 
+
----
 
Here is a link for a theoretical and practical assignment on Bayes Classifier.
 
Here is a link for a theoretical and practical assignment on Bayes Classifier.
 
*http://www.ics.uci.edu/~smyth/courses/ics274/hw3.pdf
 
*http://www.ics.uci.edu/~smyth/courses/ics274/hw3.pdf
 
--[[User:Ralazrai|Ralazrai]] 21:55, 17 February 2010 (UTC)
 
--[[User:Ralazrai|Ralazrai]] 21:55, 17 February 2010 (UTC)
 
+
----
 
'''Generating correlated multi-variate normal (MVN) data:'''
 
'''Generating correlated multi-variate normal (MVN) data:'''
 
I don't know if anyone else ran into this issue, but FreeMat doesn't know how to generate MVN random samples. The solution is to generate independent standard normal data points and perform a linear transformation. Refer to the link below for details:
 
I don't know if anyone else ran into this issue, but FreeMat doesn't know how to generate MVN random samples. The solution is to generate independent standard normal data points and perform a linear transformation. Refer to the link below for details:
Line 23: Line 24:
  
 
-Satyam
 
-Satyam
 
+
----
 
==Turn It In==
 
==Turn It In==
 
So... where do we turn this thing in?  Do we upload it to Mimi's dropbox?  Anybody know?  Thanks!  
 
So... where do we turn this thing in?  Do we upload it to Mimi's dropbox?  Anybody know?  Thanks!  
  
 
[[User:Pritchey|Pritchey]] 15:33, 26 February 2010 (UTC)
 
[[User:Pritchey|Pritchey]] 15:33, 26 February 2010 (UTC)
 
+
:: In my Rhea dropbox, as the peer review system is not quite ready yet. --[[User:Mboutin|Mboutin]] 09:48, 1 March 2010 (UTC)
 +
----
 
==R packages useful for this homework assignment==
 
==R packages useful for this homework assignment==
 
Don't know yet anybody is using R for this homework. Compared with FreeMat and Matlab, I think R is in between of them. R has more useful packages compared with FreeMat, but not as powerful as Matlab for general purpose scientific computing, except in the aspect of Statistic computing.  
 
Don't know yet anybody is using R for this homework. Compared with FreeMat and Matlab, I think R is in between of them. R has more useful packages compared with FreeMat, but not as powerful as Matlab for general purpose scientific computing, except in the aspect of Statistic computing.  
  
 
Until now, I'm still having problems with drawing the decision boundary in R and calculating the Characteristic function of F_T(\omega) in a simple way (i.e. using prod function together with integrate). Other than that, I'll list the packages/functions here that I think would be useful for finishing this homework in R.
 
Until now, I'm still having problems with drawing the decision boundary in R and calculating the Characteristic function of F_T(\omega) in a simple way (i.e. using prod function together with integrate). Other than that, I'll list the packages/functions here that I think would be useful for finishing this homework in R.
 +
 
1. sample:http://stat.ethz.ch/R-manual/R-patched/library/base/html/sample.html, for randomly generating data from different classes.
 
1. sample:http://stat.ethz.ch/R-manual/R-patched/library/base/html/sample.html, for randomly generating data from different classes.
 +
 
2. rnorm,dnorm,pnorm: http://stat.ethz.ch/R-manual/R-patched/library/stats/html/Normal.html, for dealing with 1D normal distribution.
 
2. rnorm,dnorm,pnorm: http://stat.ethz.ch/R-manual/R-patched/library/stats/html/Normal.html, for dealing with 1D normal distribution.
 +
 
3. mvtnorm package: http://stat.ethz.ch/CRAN/web/packages/mvtnorm/index.html, for multivariate normal distribution.
 
3. mvtnorm package: http://stat.ethz.ch/CRAN/web/packages/mvtnorm/index.html, for multivariate normal distribution.
 +
 
4. elliptic package: http://stat.ethz.ch/CRAN/web/packages/elliptic/index.html, for integral with complex numbers.
 
4. elliptic package: http://stat.ethz.ch/CRAN/web/packages/elliptic/index.html, for integral with complex numbers.
 +
 
5. clusterGeneration package: http://stat.ethz.ch/CRAN/web/packages/clusterGeneration/clusterGeneration.pdf, for generating multidimensional covariance matrix.
 
5. clusterGeneration package: http://stat.ethz.ch/CRAN/web/packages/clusterGeneration/clusterGeneration.pdf, for generating multidimensional covariance matrix.
  
 
--[[User:Yuanl|Yuanl]] 16:23, 28 February 2010 (UTC)
 
--[[User:Yuanl|Yuanl]] 16:23, 28 February 2010 (UTC)
 +
----
 +
For calculating covariance in Freemath as I don’t want to recreate the wheel I used cov function in Matlab. If you don’t know how to use it just type “edit cov” in Matlab and then copy the whole function as a new function to your freemath program; I don’t know if it’s acceptable or not but of course it works.
  
 +
-Golsa
 
----
 
----
 
[[ 2010 Spring ECE 662 mboutin|Back to 2010 Spring ECE 662 mboutin]]
 
[[ 2010 Spring ECE 662 mboutin|Back to 2010 Spring ECE 662 mboutin]]
 +
 +
[[ECE662|Back to ECE662]]

Latest revision as of 12:17, 12 November 2010


ECE662 Spring 2010, hw1 related discussions

This homework (see original statement here) is a freeform exercise that consists in applying Bayes decision rule to Normally distributed data. The next homework will consists in a peer review of this homework.



Here is a link to a lab on Bayes Classifier that you might find helpful. Please use it as a reference.

Enjoy, Raj..


Here is a link for a theoretical and practical assignment on Bayes Classifier.

--Ralazrai 21:55, 17 February 2010 (UTC)


Generating correlated multi-variate normal (MVN) data: I don't know if anyone else ran into this issue, but FreeMat doesn't know how to generate MVN random samples. The solution is to generate independent standard normal data points and perform a linear transformation. Refer to the link below for details:

To make matters worse, FreeMat cannot perform Cholesky decomposition. Two ways to get the desired results:

  • Instead of starting with the covariance matrix and taking the square root, start with the upper triangular matrix A and take A'A as the covariance. (Prof. Boutin's suggestion).
  • Perform singular value decomposition using FreeMat's "svd" command on the covariance matrix to get [u s v]. Then $ B = u \sqrt{s} v $ would serve as the square root.

The transformed data, using either A or B, should have be the desired statistics (please verify!).

-Satyam


Turn It In

So... where do we turn this thing in? Do we upload it to Mimi's dropbox? Anybody know? Thanks!

Pritchey 15:33, 26 February 2010 (UTC)

In my Rhea dropbox, as the peer review system is not quite ready yet. --Mboutin 09:48, 1 March 2010 (UTC)

R packages useful for this homework assignment

Don't know yet anybody is using R for this homework. Compared with FreeMat and Matlab, I think R is in between of them. R has more useful packages compared with FreeMat, but not as powerful as Matlab for general purpose scientific computing, except in the aspect of Statistic computing.

Until now, I'm still having problems with drawing the decision boundary in R and calculating the Characteristic function of F_T(\omega) in a simple way (i.e. using prod function together with integrate). Other than that, I'll list the packages/functions here that I think would be useful for finishing this homework in R.

1. sample:http://stat.ethz.ch/R-manual/R-patched/library/base/html/sample.html, for randomly generating data from different classes.

2. rnorm,dnorm,pnorm: http://stat.ethz.ch/R-manual/R-patched/library/stats/html/Normal.html, for dealing with 1D normal distribution.

3. mvtnorm package: http://stat.ethz.ch/CRAN/web/packages/mvtnorm/index.html, for multivariate normal distribution.

4. elliptic package: http://stat.ethz.ch/CRAN/web/packages/elliptic/index.html, for integral with complex numbers.

5. clusterGeneration package: http://stat.ethz.ch/CRAN/web/packages/clusterGeneration/clusterGeneration.pdf, for generating multidimensional covariance matrix.

--Yuanl 16:23, 28 February 2010 (UTC)


For calculating covariance in Freemath as I don’t want to recreate the wheel I used cov function in Matlab. If you don’t know how to use it just type “edit cov” in Matlab and then copy the whole function as a new function to your freemath program; I don’t know if it’s acceptable or not but of course it works.

-Golsa


Back to 2010 Spring ECE 662 mboutin

Back to ECE662

Alumni Liaison

Questions/answers with a recent ECE grad

Ryne Rayburn