Commits
Click on a commit to change the comparison rangefeat: add `Dataset::weighted_bootstrap`
This is an implementation of a way to generate a bootstrapped dataset keeping event weights in mind. If an event has a weight of 2.0 (or -2.0), then that event acts like two events in the dataset. If we ignore weights on resampling, we end up with a dataset with the same number of events but a different weighted number of events. This method aims to minimize this effect by sampling each event with a probability proportional to its weight (normalized by all weights). To account for the potential existence of negative weights, we first divide the dataset into positively and negatively weighted events and sample the positive set with probability sum(positive_weights) / (sum(positive_weights) - sum(negative_weights)) (note that the denominator is distinct from the total sum of weights).8 days ago
by denehoffman revert: remove weighted_bootstrap
This concept was flawed, I don't know why I expected it to work, it clearly oversamples events with higher weights because that's what I told it to do, but this obviously doesn't make the total weight of the dataset consistent. There might be a way to do this if I assume the number of events in a bootstrap need not match the original, but that requires some more thinking which I will leave out for now.8 days ago
by denehoffman style: remove test plot
I committed this by mistake8 days ago
by denehoffman