0

I am in the process of creating a neural network with the aim of being able to predict the temperature of tomorrow in my area. I have loaded the data, normalized it, divided it into a train and a test set, created a NN using the neural net library, and predicted the temperatures in the test set with a 78% accuracy. My system parts are named as follows:

nural network <- nn
nural network output <- nn.results
Data <- data frame with all the inputs (Humidity, air pressure, averages of previous temperatures, etc.)
Predicted data <- results$predicted (for the test set)

What function/code would I use to, instead of predicting data in the test set, actually predict the temperature of tomorrow?

I hope the question is not all too stupid, any help would be much appreciated though. Sorry that there is not all too much code, but it is difficult with neural networks to just give snippets.

Thank you!

Edit: I think the predict function is the way to go, however it requests “new data”, but I would like to predict solely with old data, would special formatting of the test set do the trick?

  • Perhaps the `predict` function does what you are looking for? – Martin Gal Jun 06 '21 at 14:48
  • Hello, I tried the predict function, but it only works on my test set, it doesn't allow me to expand over it. I think that the predict function is required, but I don't know how to apply it. Maybe I am also not formatting the test set correctly. Any help would be much appreciated. – Ferdinand Wehle Jun 06 '21 at 16:08
  • 1
    Please make a [great reproducible example](https://stackoverflow.com/questions/5963269/how-to-make-a-great-r-reproducible-example). This increases your chances to get any help. – Martin Gal Jun 06 '21 at 18:18

0 Answers0