title: Sklearn Error:R^2 score is not well-defined with less than two samples
body: <p>I built a data.csv in order to see how this works. So I did this one.</p>
  
  <pre><code>s1;s2;s3;s4;result
  1;2;3;4;5;15
  2;1;3;1;2;9
  19;21;0;0;0;40
  11;9;0;1;5;26
  5;5;5;5;5;25
  80;1;1;1;1;84
  1;2;3;1;1;8
  1;0;0;1;1;3
  10;10;10;10;20;60
  </code></pre>
  
  <p>As you can see, <code>result</code> is the sum of <code>s1,s2,s3 and s4.</code> So I did this.</p>
  
  <pre><code>data = pd.read_csv('example.csv', sep=';', index_col=0)
  data = data[['s1', 's2', 's3', 's4', 'result']]
  predict = 'result'
  
  
  x = np.array(data.drop([predict], 1))
  y = np.array(data[predict])
  
  x_train, x_test, y_train, y_test = sklearn.model_selection.train_test_split(x, y, test_size=0.1)
  
  linear = linear_model.LinearRegression()
  linear.fit(x_train, y_train)
  
  acc = linear.score(x_test, y_test)
  print(acc)
  </code></pre>
  
  <p>But I got this error.</p>
  
  <blockquote>
    <p>C:\Users\Sharki\Anaconda3\lib\site-packages\sklearn\metrics\regression.py:543: UndefinedMetricWarning: R^2 score is not well-defined with less than two samples.
      warnings.warn(msg, UndefinedMetricWarning)</p>
  </blockquote>
  
  <p>What's happening?</p>