I have installed the mx.net package in R version 3.4.3 using
cran <- getOption("repos")
cran["dmlc"] <- "https://s3-us-west-2.amazonaws.com/apache-mxnet/R/CRAN/"
options(repos = cran)
install.packages("mxnet").
Some issues occur while estimating a neural network.
In underneath code, I used the breastcancer dataset available on https://archive.ics.uci.edu/ml/datasets/Breast+Cancer+Wisconsin+%28Original%29.
BC_data <- read.csv("Data_breastcancer.csv", sep = ";")
# generate a train and test set
trainIndex = sample(1:nrow(BC_data), size = round(0.8*nrow(BC_data)), replace=FALSE)
train_data <- BC_data[trainIndex,]
test_data <- BC_data[-trainIndex,]
X_train <- train_data[,c(-1,-11)]
y_train <- train_data[,11]
# estimate neural network
model = mx.mlp(as.matrix(X_train), as.numeric(y_train), hidden_node = 10, out_node = 2, out_activation = "softmax", learning.rate = 0.1, num.round = 20)
However, instead of iteratively returning accuracy values, the only output I get is
Start training with 1 devices
Warning message:
In mx.model.select.layout.train(X, y) :
Auto detect layout of input matrix, use rowmajor..
so it appears that the iterative process hasn't started at all.
Does somebody know how to solve this problem?