title: Interpreting the DecisionTreeRegressor score?
body: <p>I am trying to evaluate a relevance of features and I am using <code>DecisionTreeRegressor()</code></p>
  
  <p>The related part of the code is presented below:</p>
  
  <pre><code># TODO: Make a copy of the DataFrame, using the 'drop' function to drop the given feature
  new_data = data.drop(['Frozen'], axis = 1)
  
  # TODO: Split the data into training and testing sets(0.25) using the given feature as the target
  # TODO: Set a random state.
  
  from sklearn.model_selection import train_test_split
  
  
  X_train, X_test, y_train, y_test = train_test_split(new_data, data['Frozen'], test_size = 0.25, random_state = 1)
  
  # TODO: Create a decision tree regressor and fit it to the training set
  
  from sklearn.tree import DecisionTreeRegressor
  
  
  regressor = DecisionTreeRegressor(random_state=1)
  regressor.fit(X_train, y_train)
  
  # TODO: Report the score of the prediction using the testing set
  
  from sklearn.model_selection import cross_val_score
  
  
  #score = cross_val_score(regressor, X_test, y_test)
  score = regressor.score(X_test, y_test)
  
  print score  # python 2.x 
  </code></pre>
  
  <p>When I run the <code>print</code> function, it returns the given score:</p>
  
  <blockquote>
    <p>-0.649574327334</p>
  </blockquote>
  
  <p>You can find the score function implementatioin and some explanation below <a href="https://github.com/scikit-learn/scikit-learn/blob/ef5cb84a/sklearn/base.py#L358" rel="noreferrer">here</a> and below:</p>
  
  <blockquote>
    <p>Returns the coefficient of determination <strong>R^2</strong> of the prediction.
    ...
    The best possible score is 1.0 and it can be negative (because the
            model can be arbitrarily worse).</p>
  </blockquote>
  
  <p>I could not grasp the whole concept yet, so this explanation is not very helpful for me. For instance I could not understand why score could be negative and what exactly it indicates (if something is squared, I would expect it can only be positive).</p>
  
  <hr>
  
  <p>What does this score indicates and why can it be negative? </p>
  
  <p>If you know any article (for starters) it might be helpful as well! </p>