title: Scikit K-means clustering performance measure
body: <p>I'm trying to do a clustering with K-means method but I would like to measure the performance of my clustering.</p>
  <p>I'm not an expert but I am eager to learn more about clustering.</p>
  <p>Here is my code :</p>
  <pre><code>import pandas as pd
  from sklearn import datasets
  
  #loading the dataset
  iris = datasets.load_iris()
  df = pd.DataFrame(iris.data)
  
  #K-Means
  from sklearn import cluster
  k_means = cluster.KMeans(n_clusters=3)
  k_means.fit(df) #K-means training
  y_pred = k_means.predict(df)
  
  #We store the K-means results in a dataframe
  pred = pd.DataFrame(y_pred)
  pred.columns = ['Species']
  
  #we merge this dataframe with df
  prediction = pd.concat([df,pred], axis = 1)
  
  #We store the clusters
  clus0 = prediction.loc[prediction.Species == 0]
  clus1 = prediction.loc[prediction.Species == 1]
  clus2 = prediction.loc[prediction.Species == 2]
  k_list = [clus0.values, clus1.values,clus2.values]
  </code></pre>
  <p>Now that I have my KMeans and my three clusters stored, I'm trying to use the <a href="https://en.wikipedia.org/wiki/Dunn_index" rel="nofollow noreferrer">Dunn Index</a> to measure the performance of my clustering (we seek the greater index)
  For that purpose I import the <strong>jqm_cvi package</strong> (available <a href="https://github.com/jqmviegas/jqm_cvi/blob/master/jqmcvi/base.py" rel="nofollow noreferrer">here</a>)</p>
  <pre><code>from jqmcvi import base
  base.dunn(k_list)
  </code></pre>
  <p>My question is : does any clustering internal evaluation already exist in Scikit Learn (except from silhouette_score) ? Or in another well known library ?</p>