cbergmeir / RSNNS

RSNNS: Neural Networks in R using the Stuttgart Neural Network Simulator (SNNS)
26 stars 5 forks source link

Different results using Windows or Linux #18

Open mariusbommert opened 4 years ago

mariusbommert commented 4 years ago

Hello,

I would like to know why the results using Windows or Linux are different.

library(RSNNS)

set.seed(1)

data = matrix(rnorm(300), ncol = 3)
model = mlp(x = data[1:95, 1:2], y = data[1:95, 3], size = 5)
predict = predict(model, data5[96:100, 1:2])
predict
# Results using Windows:
#           [,1]
# 96  0.02506411
# 97  0.01911207
# 98  0.02082419
# 99  0.01711116
# 100 0.01743222

# Results using Linux:
#           [,1]
# 96  0.02582934
# 97  0.01976289
# 98  0.02150856
# 99  0.01771399
# 100 0.01804006

The R versions and the versions of package RSNNS are the same.

Best regards, Marius

cbergmeir commented 4 years ago

Hi,

good question, to be honest I don't know. Either different random number generators, or different compiler optimizations or similar come to mind.