Skip to content

Commit

Permalink
Crossfader
Browse files Browse the repository at this point in the history
  • Loading branch information
mewo2 committed Apr 29, 2012
1 parent 15a95df commit 74aa5ad
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions crossfade.R
@@ -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.