Skip to content

Commit

Permalink
Addding a RankGeo script for ease
Browse files Browse the repository at this point in the history
  • Loading branch information
mpearmain committed Feb 1, 2016
1 parent 638c4a6 commit e4e12bf
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions R/rankGeo.R
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
# Geo rank

library(data.table)
x1 <- fread("./output/ens_bag5_20160131_seed132.csv", data.table = F)
x2 <- fread("./output/sub46.csv", data.table = F)

x1[,2] <- rank(x1[,2])/nrow(x1)
x2[,2] <- rank(x2[,2])/nrow(x2)
# check that the index ordering matches :-)
xfor <- x1
xfor[,2] <- exp(0.5 * log(x1[,2]) + 0.5 * log(x2[,2]))
# save, submit, (hopefully) smile
write.csv(xfor, "./submissions/xmix_01022016_5050.csv", row.names = F)

0 comments on commit e4e12bf

Please sign in to comment.