Body: <p>I am working on stock price prediction project, I am using the <a href="https://scikit-learn.org/stable/modules/generated/sklearn.svm.SVR.html" rel="nofollow noreferrer">support vector regression (SVR) model</a> for it.</p>
  
  <p>As I am splitting my data into train and test, I am getting high accuracy while predicting test data after fitting the model.</p>
  
  <p>But now when I am trying to use another data which I separate out from the used dataset before start doing anything, it gives me very bad results. Can anyone tell me what's happening?</p>
  
  <p><a href="https://i.sstatic.net/bHKzL.png" rel="nofollow noreferrer"><img src="https://i.sstatic.net/bHKzL.png" alt="enter image description here"></a></p>
  
  <p>Looking forward to your response.</p>
  
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2020-05-25T23:50:17.000Z
Comments.Text: Rather than providing a screenshot of the code, it may be a good idea to explain how you obtained that separate dataset. Maybe you should also describe more in detail your datasets (e.g. how many entries they have, how many features, etc.). Also, note that in the source code that you're showing us, apparently, you're calculating the `r2_score` rather than the accuracy. You should clarify this (because in your post you say "accuracy").
Comments.UserDisplayName: nbro
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2020-05-26T05:14:12.093Z
Comments.Text: The difference is very large. Have you used any type of scaling? Maybe you forgot to scale the newest data set?
Comments.UserDisplayName: GKozinski
Tags: <machine-learning><data-science><support-vector-machine><accuracy>
Title: Why is the accuracy of my model very low on a separate dataset from the training and test datasets?
UserDisplayName: Debugger
ThreadText: # Why is the accuracy of my model very low on a separate dataset from the training and test datasets?
  
  (Asked by: username_0 on 2020-05-25)
  
  I am working on stock price prediction project, I am using the [support vector regression (SVR) model](https://scikit-learn.org/stable/modules/generated/sklearn.svm.SVR.html) for it.
  
  As I am splitting my data into train and test, I am getting high accuracy while predicting test data after fitting the model.
  
  But now when I am trying to use another data which I separate out from the used dataset before start doing anything, it gives me very bad results. Can anyone tell me what's happening?
  
  [![enter image description here](https://i.sstatic.net/bHKzL.png)](https://i.sstatic.net/bHKzL.png)
  
  Looking forward to your response.
  
  **Tags:** machine-learning, data-science, support-vector-machine, accuracy
  
  > **Comments:**
  > **username_1**: Rather than providing a screenshot of the code, it may be a good idea to explain how you obtained that separate dataset. Maybe you should also describe more in detail your datasets (e.g. how many entries they have, how many features, etc.). Also, note that in the source code that you're showing us, apparently, you're calculating the `r2_score` rather than the accuracy. You should clarify this (because in your post you say "accuracy").  
  > **username_2**: The difference is very large. Have you used any type of scaling? Maybe you forgot to scale the newest data set?  
  
  ---
  
  ## 0 answers
  
  