title: ValueError: Can't handle mix of multilabel-indicator and continuous-multioutput accuracy_score()
body: <p>I am trying to determine the accuracy score of prediction models between KNN and Random Forest but the accuracy_score method is giving the error given in the subject line. My code is the following:</p>
  
  <pre><code>from sklearn.neighbors import KNeighborsClassifier
  knn = KNeighborsClassifier()
  knn.fit(x_train,y_train)
  knn.predict(x_test)
  #Accuracy of prediction
  y_pred = knn.predict(x_test)
  #predictions = [round(value) for value in y_pred]
  from sklearn.metrics import accuracy_score
  accuracy = accuracy_score(y_test, y_pred)
  print("Accuracy: %.2f%%" % (accuracy * 100.0))    
  </code></pre>
  
  <p>Output of the above accuracy print statement is :</p>
  
  <pre><code>Accuracy: 80.04%
  </code></pre>
  
  <p>Now the 2nd method:</p>
  
  <pre><code>from sklearn.ensemble import RandomForestRegressor
  model = RandomForestRegressor(n_estimators=100, min_samples_leaf=10,     
  random_state=1)
  model.fit(x_train, y_train)
  print(model.score)
  #Accuracy of prediction
  y_pred = model.predict(x_test)
  accuracy = accuracy_score(y_test, y_pred)
  print("Accuracy: %.2f%%" % (accuracy * 100.0))
  </code></pre>
  
  <p>The accuracy_score function gives the below error in the case of Random Forest</p>
  
  <pre><code>accuracy = accuracy_score(y_test, y_pred)
  Traceback (most recent call last):
  
  File "&lt;ipython-input-263-232dbb7449ea&gt;", line 1, in &lt;module&gt;
  accuracy = accuracy_score(y_test, y_pred)
  
  File "C:\Anaconda3\lib\site-packages\sklearn\metrics\classification.py",    
  line 172, in accuracy_score
  y_type, y_true, y_pred = _check_targets(y_true, y_pred)
  
  File "C:\Anaconda3\lib\site-packages\sklearn\metrics\classification.py",   
  line 82, in _check_targets
  "".format(type_true, type_pred))
  ValueError: Can't handle mix of multilabel-indicator and continuous- 
  multioutput
  </code></pre>
  
  <p><strong>Why is the accuracy_score in the case of 2nd classifier RandomForest giving this Value error?</strong>
  <strong>ValueError: Can't handle mix of multilabel-indicator and continuous-multioutput accuracy_score()</strong></p>
  
  <p>Any suggestions are greatly appreciated!</p>