May i know is that my data go wrong or what mistakes? i can't find the mistakes

data = read.csv("test.csv")

samplesize = 0.6* nrow(data)
set.seed(80)
index = sample( seq_len(nrow(data)), size=samplesize)

trainset = data[index,]
testset = data[-index,]

max = apply(data , 2 , max)
min = apply(data , 2 , min)
scaled = as.data.frame(scale(data, center = min , scale = max - min))

str(data)
data$Adj.Close = as.numeric(data$Adj.Close)

install.packages("neuralnet")
library(neuralnet)

trainNN =scaled[index,]
testNN = scaled[-index,]

set.seed(2)
NN = neuralnet(Adj.Close ~ Inflation + GDP.growth.rate + Unemployment.Rate + House.Price.index + Construction.Output,
trainNN, hidden = 3, linear.output = F )

What is the problem?

This topic was automatically closed 21 days after the last reply. New replies are no longer allowed.

If you have a query related to it or one of the replies, start a new topic and refer back with a link.