Permalink
Browse files

Crossfader

  • Loading branch information...
1 parent 15a95df commit 74aa5ad4f499b76d7d7ef3f9b8eed87a68ec7c06 @mewo2 committed Apr 29, 2012
Showing with 16 additions and 0 deletions.
  1. +16 −0 crossfade.R
View
@@ -0,0 +1,16 @@
+argv <- commandArgs(T);
+
+early <- argv[1];
+late <- argv[2];
+outfile <- argv[3];
+
+submit <- read.csv('data/SubmissionZerosExceptNAs.csv')
+early <- read.csv(early);
+late <- read.csv(late);
+
+alpha <- (submit$position_within_chunk - 193) / 71
+for (target in colnames(submit)[6:44]) {
+ submit[,target] <- alpha * late[,target] + (1-alpha) * early[,target];
+}
+
+write.csv(submit, outfile);

0 comments on commit 74aa5ad

Please sign in to comment.