Line 28: | Line 28: | ||
[[User:Pritchey|Pritchey]] 15:33, 26 February 2010 (UTC) | [[User:Pritchey|Pritchey]] 15:33, 26 February 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. | ||
+ | |||
+ | --[[User:Yuanl|Yuanl]] 16:23, 28 February 2010 (UTC) | ||
---- | ---- | ||
[[ 2010 Spring ECE 662 mboutin|Back to 2010 Spring ECE 662 mboutin]] | [[ 2010 Spring ECE 662 mboutin|Back to 2010 Spring ECE 662 mboutin]] |
Revision as of 11:23, 28 February 2010
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)
- 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)