nvwildfire
Technical User
I have a dataset that I need to randomly select x number of rows of that dataset, but I want some of the rows to have a greater probability of getting selected than others based on a calculated weight value, although I still want the chance of a row that has a low weight to get selected. Hope that made sense. So each row gets a weight based on numerous criteria, I don't know what the max value and the min value could be 0. My plan is to normalize the weight values between 0 and 1, the normalized value for each row would represent the probability of getting chose. After this point I have no idea of how to randomly select values with this weight or probability. Has anyone else out there had to do a weighted random selection like this? Any ideas would be great. I am not looking for the code specifically more the concept.
thanks in advance.
kgk
thanks in advance.
kgk