Created
March 7, 2016 16:28
-
-
Save jfarid27/6aa6dfcce4471ca98e7f to your computer and use it in GitHub Desktop.
A bootstrapping example
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def bootstrapping(observable, dataset, samples=1000): | |
observableDist = [] | |
for n in range(samples): | |
sample = [] | |
for k in range(len(data)) | |
sample.append(dataset[random.randint(0, len(dataset)-1)]) | |
observableDist.append(observable(sample)) | |
return observableDist |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment