library(neuralnet) mix = read.csv("mix.csv",sep=';') nn = neuralnet( acid~qH+qO+qOd, data=mix, hidden = c(10,5,3,5), linear.output = F) mix$npKa = scale( mix$pKa, center = min(mix$pKa), scale = max(mix$pKa) - min(mix$pKa) ) nn = neuralnet( npKa~qH+qO+qOd, data=mix, hidden = c(5), linear.output = T, rep = 5, threshold = .0001) npred <- compute(nn,mix[,6:8]) pred <- npred$net.result*( max(mix$pKa)-min(mix$pKa))+min(mix$pKa) plot(npred$net.result,mix$npKa) ntrain <- scaled[-s,] ntest <- scaled[s,]