Last active
March 15, 2017 11:18
-
-
Save HackerEarthBlog/d19647674a1ebaeaec2afd0d46861563 to your computer and use it in GitHub Desktop.
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
#load package | |
require(mxnet) | |
#convert target variables into numeric | |
train[,target := as.numeric(target)-1] | |
test[,target := as.numeric(target)-1] | |
#convert train data to matrix | |
train.x <- data.matrix(train[,-c("target"),with=F]) | |
train.y <- train$target | |
#convert test data to matrix | |
test.x <- data.matrix(test[,-c("target"),with=F]) | |
test.y <- test$target |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
When I convert the target variables into numeric, I get the following warning:
"Warning message:
In eval(expr, envir, enclos) : NAs introduced by coercion"
I checked train and test variables again after that and the whole "target" column is filled with NAs. How can I solve this?
Thanks in advance!