Re: [Numpy-discussion] Question about numpy.random.choice with probabilties

2017-01-23 Thread Nadav Har'El
On Mon, Jan 23, 2017 at 4:52 PM, aleba...@gmail.com wrote: > > > 2017-01-23 15:33 GMT+01:00 Robert Kern : > >> >> I don't object to some Notes, but I would probably phrase it more like we >> are providing the standard definition of the jargon term

Re: [Numpy-discussion] Question about numpy.random.choice with probabilties

2017-01-23 Thread Nadav Har'El
On Mon, Jan 23, 2017 at 5:47 PM, Robert Kern wrote: > > > As for the standardness of the definition: I don't know, have you a > reference where it is defined? More natural to me would be to have a list > of items with integer multiplicities (as in: "cat" 3 times, "dog" 1

Re: [Numpy-discussion] Question about numpy.random.choice with probabilties

2017-01-18 Thread Nadav Har'El
On Wed, Jan 18, 2017 at 1:58 AM, aleba...@gmail.com <aleba...@gmail.com> wrote: > > > 2017-01-17 22:13 GMT+01:00 Nadav Har'El <n...@scylladb.com>: > >> >> On Tue, Jan 17, 2017 at 7:18 PM, aleba...@gmail.com <aleba...@gmail.com> >> wrote: >

Re: [Numpy-discussion] Question about numpy.random.choice with probabilties

2017-01-18 Thread Nadav Har'El
On Wed, Jan 18, 2017 at 11:00 AM, aleba...@gmail.com wrote: > Let's look at what the user asked this function, and what it returns: > >> >> User asks: please give me random pairs of the three items, where item 1 >> has probability 0.2, item 2 has 0.4, and 3 has 0.4. >> >>

Re: [Numpy-discussion] Question about numpy.random.choice with probabilties

2017-01-17 Thread Nadav Har'El
ty 0.5. >> >> My question is how does this result fit the desired probabilities? >> >> If we get [1,2] at probability 0.2 and [1,3] at probability 0.2333, >> then the expect number of "1" results we'll get per drawing is 0.23333 + >> 0.23

[Numpy-discussion] Question about numpy.random.choice with probabilties

2017-01-17 Thread Nadav Har'El
ll get per drawing is 0.2 + 0.2333 = 0.4, and similarly for "2" the expected number 0.7666, and for "3" 0.7. As you can see, the proportions are off: Item 2 is NOT twice common than item 1 as we originally desired (we asked for probabilities 0.2, 0.4, 0.4 for the individua

Re: [Numpy-discussion] Question about numpy.random.choice with probabilties

2017-01-18 Thread Nadav Har'El
On Wed, Jan 18, 2017 at 4:30 PM, wrote: > > > Having more sampling schemes would be useful, but it's not possible to >> implement sampling schemes with impossible properties. >> >> > > BTW: sampling 3 out of 3 without replacement is even worse > > No matter what sampling