title: sklearn: silhouette score different for same clustering
body: <p>I modified the <a href="http://scikit-learn.org/stable/auto_examples/cluster/plot_cluster_comparison.html" rel="nofollow noreferrer">Cluster comparison</a> script to compute <a href="http://scikit-learn.org/stable/modules/generated/sklearn.metrics.silhouette_score.html" rel="nofollow noreferrer"><code>silhouette_score</code></a> on the clustering output.</p>
  
  <p>I added this line:</p>
  
  <pre><code>sil = silhouette_score(X, y_pred, metric='euclidean') if len(np.unique(y_pred)) &gt; 1 else float('NaN')
  </code></pre>
  
  <p>and modified the <code>plt.text()</code> line for showing the <code>sil</code> value in the subplot:</p>
  
  <pre><code>txt = 'sil={:.3f}\n{:.2f}s'.format(sil,(t1 - t0))
  plt.text(.99, .01, txt, transform=plt.gca().transAxes, size=15, horizontalalignment='right')
  </code></pre>
  
  <p>This is what I get:</p>
  
  <p><img src="https://i.stack.imgur.com/LnmZC.png" alt="1"></p>
  
  <p>Look at 3rd row, for columns MeanShoft and DBSCAN. Clustering is the same, but silhouette score is significantly lower for DBSCAN. How come?</p>
  
  <p><sub>Since this question is not about a programming error, shall this be moved to stats?</sub></p>