Created
July 16, 2015 21:48
-
-
Save gerrich/07935114dcf41590dcc3 to your computer and use it in GitHub Desktop.
R data.frame factor oneHot encoding
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
X = sparse.model.matrix( | |
as.formula( | |
paste("Hazard~", paste(colnames(ts.train), sep = "_", collapse=" +")) | |
), data = ts.train) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment