简体   繁体   中英

Neural Network converging and accurate in training, but failing in real world

This is my first question on this site. I'm attempting to practice neural networks by having my program predict whether the temperature will go up or down on a given day relative to the previous day. My training data set consists of the previous ten days and whether they went up or down relative to the day before them. I'm not implying this is an effective way to predict weather, but that makes my problem even more confusing.

When I train the program over 25 days (50 days ago to 25 days ago) then test it on the next 25 days (25 days ago to yesterday) I consistently get 100% accuracy in the test set. I've added an alpha for gradient descent and have around 60 hidden layers, and if I make the alpha something bigger like 0.7 the accuracy will reduce to ~40%, so I think my testing code is correct.

Assuming I have a true 100% accuracy, I had the program predict tomorrow's weather, then use that and 9 days of historical to predict the day after tomorrow, and so on until I've predicted 5 days in the future. I then waited to see what the weather would be and my program was comically bad in its predictions. I ran this for a week to test, and had an accuracy of predicting the next day of about 60% and after that only around 10%.

TL;DR Sorry for rambling the details, but my question is what would cause a neural network to be 100% accuracy in testing and then fail spectacularly in practice? Thanks for the help, I can post code if needed (and someone explains how to in a comment)

What Ashafix says was my first though, you should post your training and test data also the data that you use for 'real world'. Another problem it could be that when you are testing, you are using only previous correct whether data(data you already have), and when you are in practice you are using your predicts and correct whether data. You should be consistent here. PD. Sorry for my english, I'm still learning.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM