4%~a-4|a
Den 6:27 onsdag den 11. januar 2017 skrev Skip Cave
:
Ben, Jose, Raul, Roger,
Thanks so much for your efforts in providing various solutions to my index
problem.
I am continually amazed at the diversity of options that J's primitives
provide to approach problems.
Ben:
4
in the first paragraph in jwiki on jandroid, it said
. The first run will take about 1 minute to decompress files. After
installation process has completed, tap on *Back Button* to finish install.
On 11 Jan, 2017 11:01 am, "Don Guinn" wrote:
> Yes. I gathered that. It would be nice of a warni
> Ben:
> 4$.$. i.3 4 NB. Unboxed using Sparse
Btw, this produces indices for the non-zero elements of the array only, which
is not according to your specs.
Sorry for that.
--
For information about J forums see http://www.js
experienced kdb/q contractor needed for top financial firm in NYC. Please
email resume and a good time to contact.
--
For information about J forums see http://www.jsoftware.com/forums.htm
Easy to fix, though:
4$.$. 1+i.3 4
--
Raul
On Wed, Jan 11, 2017 at 7:06 AM, Ben Gorte - CITG
wrote:
>
>> Ben:
>> 4$.$. i.3 4 NB. Unboxed using Sparse
>
> Btw, this produces indices for the non-zero elements of the array only, which
> is not according to your specs.
> Sorry for that.
>
>
Ben's approach using Sparse has a useful side:
t
1 0 0 1 0 1
0 1 0 0 1 0
1 1 1 0 1 1
1 1 0 1 1 1
ix1 =: 4$.$.
NB. list indices only where there is a 1. Binary array input
ix1 t
0 0
0 3
0 5
1 1
1 4
2 0
2 1
2 2
2 4
2 5
3 0
3 1
3 3
3 4
3 5
Skip Cave
On Wed, Jan 11,
Dear all,
How would you draw samples from a multivariate gaussian distribution?
E.g. a gaussian with mean 'mu=:0 4' and covariance 'sg=:2 2 $ 3 0 0 0.5'
Best wishes,
Pierre-Edouard
--
--
For information about J forums see http:/
Your example has 0 valued off-diagonal elements in sq, so there is no
covariance and 2 independent gaussians can be used.
But it your sg had non-zero off-diagonals then according to a very old
reference, if you can find lower triangular matrix c such that sg -: c+/ .
*|:c then you can generate X=
I answered my question by implementing this method:
https://en.wikipedia.org/wiki/Multivariate_normal_distribution#Drawing_values_from_the_distribution
NB. drawing a random vector from a multivariate normal distribution
require '~addons/stats/distribs/normal.ijs'
load 'math/lapack'
load 'math/lapa
Thank you!
I think I did just the way you described.
Pierre-Edouard Portier
On Wed, Jan 11, 2017 at 12:25:56PM -0500, Brian Schott wrote:
> Your example has 0 valued off-diagonal elements in sq, so there is no
> covariance and 2 independent gaussians can be used.
>
> But it your sg had non-zero
NB. A generator of random numbers from a standard normal distribution
gauss=. 3 : '+/(?-?)0$~6,y'
gauss 5
1.44394 _0.23159 0.150841 0.499904 1.16614
Den 18:26 onsdag den 11. januar 2017 skrev Brian Schott
:
Your example has 0 valued off-diagonal elements in sq, so there is no
cov
11 matches
Mail list logo