(Added tips for generating MVN data)
Line 14: Line 14:
 
--[[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:'''
 +
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:
 +
*http://www.stat.uiuc.edu/stat428/cndata.html
  
 +
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 <math> B = u \sqrt{s} v </math> would serve as the square root.
 +
 +
The transformed data, using either A or B, should have be the desired statistics (please verify!).
 +
 +
-Satyam
  
 
----
 
----
 
[[ 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 18:25, 18 February 2010


ECE662 hw1 related discussions

Put your content here . . .


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


Back to 2010 Spring ECE 662 mboutin

Alumni Liaison

Ph.D. 2007, working on developing cool imaging technologies for digital cameras, camera phones, and video surveillance cameras.

Buyue Zhang