Python Forum
Regarding how to randomizing list with having equal probability
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Regarding how to randomizing list with having equal probability
#15
@ Grillboulis

Well, I don't think that memory is so great a consideration nowadays.

The above completes in the blink of an eye. It's not like it takes minutes to finish.

Put in a function, as you recently told me I believe, as soon as the function completes, the garbage collector removes all leftovers.

I don't think I need to check if the tuples of 9 images have any repeats of 1 image, because they are combinations, which should be unique, I think, but I wasn't sure, as I never deal in permutations and combinations, so it is just a safety.

If permutations of 9 from 24 are allowed, there will be nearly 500 trillion permutations to choose from.

Isn't it possible to get permutations with random.sample()??
Reply


Messages In This Thread
RE: Regarding how to randomizing list with having equal probability - by Pedroski55 - Nov-06-2022, 11:09 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  Check if two matrix are equal and of not add the matrix to the list quest 3 878 Jul-10-2023, 02:41 AM
Last Post: deanhystad
  detect equal sequences in list flash77 17 2,952 Oct-28-2022, 06:38 AM
Last Post: flash77
  is there equal syntax to "dir /s /b" kucingkembar 2 1,026 Aug-16-2022, 08:26 AM
Last Post: kucingkembar
  How to draw the Probability Density Function (PDF) plot regardless of sampe size? amylopectin 3 3,586 Mar-02-2022, 09:34 PM
Last Post: Larz60+
  Can a variable equal 2 things? Extra 4 1,539 Jan-18-2022, 09:21 PM
Last Post: Extra
  finding probability of exceding certain threshold Staph 1 1,948 Dec-14-2019, 04:58 AM
Last Post: Larz60+
  Not equal a dictionary key value bazcurtis 2 1,961 Dec-11-2019, 11:15 PM
Last Post: bazcurtis
  Randomizing Color Output ammorgan 0 2,009 Dec-27-2018, 03:31 AM
Last Post: ammorgan
  Realized variance and daily probability distribution petergarylee 1 2,475 Jul-06-2018, 02:21 PM
Last Post: buran
  Misunderstanding with the “if” statement and “not equal” scriptoghost 6 4,469 Jun-23-2017, 09:43 AM
Last Post: DeaD_EyE

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020