Hello, BobDuin. what is the relation between a sample weight and the probability that it is selected? (gendatw). Thanks a lot.
If a weight is twice as large, it is two times more probable it is selected, e.g.
a = dataset([1 2 3 4 5]’); % 5 objects in 1D w = [4 4 2 2 1]; % their weights x = gendatw(a,w,10000); % generate 10000 new objects histc(+x,[1:5]) % show a histogram
ans =
3067 3094 1558 1528 753
Bob
Thanks a lot!