Answers.Body: <p>It is basically because of the simplicity of the data points and nothing strange about the code. If you look at the plot in the blog, you can basically replicate those observations with a simple mathematical function. Additionally, the data points are just in two dimensions which makes the problem even simpler. This data basically has a trend that is linear (of the form <code>mx + c</code>) and a sinusoidal variation with some local low-frequency noise.</p>
  <p>It is generally understood and known that for any simple dataset where the patterns are very obvious to the human eye, any machine learning algorithm will easily learn the pattern. If it can also be expressed mathematically fairly in a simple form, then any ML model will learn to generalize it. You can repeat that exercise by replacing the same data with a simple sinusoid and will see similar results.</p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2022-10-14T13:44:24.250Z
Answers.LastActivityDate: 2022-10-14T13:44:24.250Z
Answers.UserDisplayName: Arun Aniyan
Body: <p>I am using this code here: <a href="https://machinelearningmastery.com/time-series-prediction-lstm-recurrent-neural-networks-python-keras/" rel="nofollow noreferrer">https://machinelearningmastery.com/time-series-prediction-lstm-recurrent-neural-networks-python-keras/</a> and more specifically the python code under the (1st) paragraph &quot;LSTM Network for Regression&quot;. I am testing it with a simple .csv file where I have the 1st column (X values) and the 2nd column (Y values). I get extremely good results. My concern is: Do you something strange on the code of the above link?</p>
  
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2022-10-14T13:20:09.557Z
Comments.Text: I mean how can I face so good accuracy? Which are the python commands (from the above code)  more responsible for that?
Comments.UserDisplayName: jim
Tags: <recurrent-neural-networks><python><long-short-term-memory>
Title: Extremely good results in RNN-LSTM python code!! How can this happen?
UserDisplayName: jim
ThreadText: # Extremely good results in RNN-LSTM python code!! How can this happen?
  
  (Asked by: username_0 on 2022-10-14)
  
  I am using this code here: <https://machinelearningmastery.com/time-series-prediction-lstm-recurrent-neural-networks-python-keras/> and more specifically the python code under the (1st) paragraph "LSTM Network for Regression". I am testing it with a simple .csv file where I have the 1st column (X values) and the 2nd column (Y values). I get extremely good results. My concern is: Do you something strange on the code of the above link?
  
  **Tags:** recurrent-neural-networks, python, long-short-term-memory
  > **Comments:**
  > **username_0**: I mean how can I face so good accuracy? Which are the python commands (from the above code)  more responsible for that?  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_1 on 2022-10-14. Score: 4 | Accepted answer
  
  It is basically because of the simplicity of the data points and nothing strange about the code. If you look at the plot in the blog, you can basically replicate those observations with a simple mathematical function. Additionally, the data points are just in two dimensions which makes the problem even simpler. This data basically has a trend that is linear (of the form `mx + c`) and a sinusoidal variation with some local low-frequency noise.
  
  It is generally understood and known that for any simple dataset where the patterns are very obvious to the human eye, any machine learning algorithm will easily learn the pattern. If it can also be expressed mathematically fairly in a simple form, then any ML model will learn to generalize it. You can repeat that exercise by replacing the same data with a simple sinusoid and will see similar results.
  
  
  ---
  
  