bips-hb / neuralnet

Training of Neural Networks
30 stars 12 forks source link

nn.train broken #22

Closed gwangjinkim closed 5 years ago

gwangjinkim commented 5 years ago
if(!require(deepnet)){install.packages("deepnet"); require(deepnet)}

data ("Boston", package="MASS")
data <- Boston
keeps <- c("crim", "indus", "nox", "rm", "age", "dis", "tax", "ptratio", "lstat", "medv")
data <- data[keeps]

f <- medv ~ crim + indus + nox + rm + age + dis + tax + ptratio + lstat

n <- nrow(data)
train <- sample(1:n, 400, FALSE)

set.seed(2016)
X <- data[train, 1:9]
Y <- data[train, 10]

fitB <- nn.train(x=as.matrix(X), y=Y, initW = NULL, initB = NULL,
                 hidden = c(10, 12, 20),
                 learningrate = 0.58,
                 momentum = 0.74,
                 learningrate_scale = 1,
                 activationfun="sigm", # linear tanh 
                 output="linear", # "sigm" "softmax"
                 numepochs=970,
                 batchsize=60,
                 hidden_dropout=0,
                 visible_dropout=0) # 

summary(fitB)

                   Length Class  Mode     
input_dim             1   -none- numeric  
output_dim            1   -none- numeric  
hidden                3   -none- numeric  
size                  5   -none- numeric  
activationfun         1   -none- character
learningrate          1   -none- numeric  
momentum              1   -none- numeric  
learningrate_scale    1   -none- numeric  
hidden_dropout        1   -none- numeric  
visible_dropout       1   -none- numeric  
output                1   -none- character
W                     4   -none- list     
vW                    4   -none- list     
B                     4   -none- list     
vB                    4   -none- list     
post                  5   -none- list     
pre                   5   -none- list     
e                    41   -none- numeric  
L                  6790   -none- numeric  

Creating model doesn't work. Neither in R3.4.3, nor in R3.5.0!

mnwright commented 5 years ago

Wrong package? This is neuralnet not deepnet.

gwangjinkim commented 5 years ago

oh sorry - I was just before that trying neuralnet. :D

gwangjinkim commented 5 years ago

Sorry - I should have posted that to deepnet. My apologies.