I am experimenting with various algorithms in a package neuralnet, but when I try to use a traditional algorithm backprop, the results are very strange / disappointing. Almost all the calculated results ~ .33 ??? I assume that I should use the algorithm incorrectly, as if I started it by default rprop+, it distinguishes between selections. Of course, normal backpropagagation is not so bad, especially if it is able to move so close to a given threshold.
library(neuralnet)
data(infert)
set.seed(123)
fit <- neuralnet::neuralnet(formula = case~age+parity+induced+spontaneous,
data = infert, hidden = 3,
learningrate = 0.01,
algorithm = "backprop",
err.fct = "ce",
linear.output = FALSE,
lifesign = 'full',
lifesign.step = 100)
preds <- neuralnet::compute(fit, infert[,c("age","parity","induced","spontaneous")])$net.result
summary(preds)
V1
Min. :0.3347060
1st Qu.:0.3347158
Median :0.3347161
Mean :0.3347158
3rd Qu.:0.3347162
Max. :0.3347286
Can any settings here be different?
Default neuralnet example
set.seed(123)
fit <- neuralnet::neuralnet(formula = case~age+parity+induced+spontaneous,
data = infert, hidden = 3,
err.fct = "ce",
linear.output = FALSE,
lifesign = 'full',
lifesign.step = 100)
preds <- neuralnet::compute(fit, infert[,c("age","parity","induced","spontaneous")])$net.result
summary(preds)
V1
Min. :0.1360947
1st Qu.:0.1516387
Median :0.1984035
Mean :0.3346734
3rd Qu.:0.4838288
Max. :1.0000000