I had a problem when I should be able to generate a set of randomly selected numbers of a multidimensional normal distribution with an average of 0 and a given 3 * 3 variance-covariance matrix in Java.
Is there an easy way to do this?
1) Use the library implementation as suggested by Dima.
Or, if you really feel the burning need to do it yourself:
2) , M V / V, Cholesky Decomposition V, L , V = LL t ( t ). Z ( Random.nextGaussian() ). LZ + M .
Random.nextGaussian()
LZ + M
Apache Commons , :
MultivariateNormalDistribution mnd = new MultivariateNormalDistribution(means, covariances); double vals[] = mnd.sample();
Source: https://habr.com/ru/post/1570316/More articles:Django 1.7 на AWS Elastic Beanstalk - приложение не работает, только смотрите "Index Of/" - djangoJPA selects query with timestamps and date fields, cannot get results - javaHow to add custom Sling binding? - jspTwitter bootstrap hint issue - javascriptStoring a function like [Integer] → a - haskellType conversion in VHDL: from real to integer - is rounding mode set? - type-conversionКакая разница между "Регулярная высота" и "Любая высота" в компактной ширине в классах размеров? - iosPrint the last two lines in a text file - javaCan Vivado handle user-defined physical types? - vhdlWhy is the position of the line pointer different? - pointersAll Articles