Created
January 23, 2018 20:10
-
-
Save flxw/4301acf00145da268d078b5f64927a8f to your computer and use it in GitHub Desktop.
This file contains hidden or 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
source('load_data.R') | |
d = read_and_preprocess_data_file('data/BADS_WS1718_known.csv') | |
n = nrow(d) | |
ratio = sum(d$return) / n | |
set.seed(1) | |
accuracy = 100000 | |
randomized_returns = sample(accuracy, n, replace=TRUE)/accuracy | |
randomized_returns = ifelse(randomized_returns > ratio, 1, 0) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment