parameters: (labels_true, labels_pred)
return_statement: return homogeneity_completeness_v_measure(labels_true, labels_pred)[0]
docstring: Homogeneity metric of a cluster labeling given a ground truth.
  
      A clustering result satisfies homogeneity if all of its clusters
      contain only data points which are members of a single class.
  
      This metric is independent of the absolute values of the labels:
      a permutation of the class or cluster label values won't change the
      score value in any way.
  
      This metric is not symmetric: switching ``label_true`` with ``label_pred``
      will return the :func:`completeness_score` which will be different in
      general.
  
      Read more in the :ref:`User Guide <homogeneity_completeness>`.
  
      Parameters
      ----------
      labels_true : int array, shape = [n_samples]
          ground truth class labels to be used as a reference
  
      labels_pred : array, shape = [n_samples]
          cluster labels to evaluate
  
      Returns
      -------
      homogeneity : float
         score between 0.0 and 1.0. 1.0 stands for perfectly homogeneous labeling
  
      References
      ----------
  
      .. [1] `Andrew Rosenberg and Julia Hirschberg, 2007. V-Measure: A
         conditional entropy-based external cluster evaluation measure
         <http://aclweb.org/anthology/D/D07/D07-1043.pdf>`_
  
      See also
      --------
      completeness_score
      v_measure_score
  
      Examples
      --------
  
      Perfect labelings are homogeneous::
  
        >>> from sklearn.metrics.cluster import homogeneity_score
        >>> homogeneity_score([0, 0, 1, 1], [1, 1, 0, 0])
        1.0
  
      Non-perfect labelings that further split classes into more clusters can be
      perfectly homogeneous::
  
        >>> print("%.6f" % homogeneity_score([0, 0, 1, 1], [0, 0, 1, 2]))
        ...                                                  # doctest: +ELLIPSIS
        1.0...
        >>> print("%.6f" % homogeneity_score([0, 0, 1, 1], [0, 1, 2, 3]))
        ...                                                  # doctest: +ELLIPSIS
        1.0...
  
      Clusters that include samples from different classes do not make for an
      homogeneous labeling::
  
        >>> print("%.6f" % homogeneity_score([0, 0, 1, 1], [0, 1, 0, 1]))
        ...                                                  # doctest: +ELLIPSIS
        0.0...
        >>> print("%.6f" % homogeneity_score([0, 0, 1, 1], [0, 0, 0, 0]))
        ...                                                  # doctest: +ELLIPSIS
        0.0...
docstring_summary: Homogeneity metric of a cluster labeling given a ground truth.
docstring_tokens: Homogeneity metric of a cluster labeling given a ground truth .
function: def homogeneity_score(labels_true, labels_pred):
      """Homogeneity metric of a cluster labeling given a ground truth.
  
      A clustering result satisfies homogeneity if all of its clusters
      contain only data points which are members of a single class.
  
      This metric is independent of the absolute values of the labels:
      a permutation of the class or cluster label values won't change the
      score value in any way.
  
      This metric is not symmetric: switching ``label_true`` with ``label_pred``
      will return the :func:`completeness_score` which will be different in
      general.
  
      Read more in the :ref:`User Guide <homogeneity_completeness>`.
  
      Parameters
      ----------
      labels_true : int array, shape = [n_samples]
          ground truth class labels to be used as a reference
  
      labels_pred : array, shape = [n_samples]
          cluster labels to evaluate
  
      Returns
      -------
      homogeneity : float
         score between 0.0 and 1.0. 1.0 stands for perfectly homogeneous labeling
  
      References
      ----------
  
      .. [1] `Andrew Rosenberg and Julia Hirschberg, 2007. V-Measure: A
         conditional entropy-based external cluster evaluation measure
         <http://aclweb.org/anthology/D/D07/D07-1043.pdf>`_
  
      See also
      --------
      completeness_score
      v_measure_score
  
      Examples
      --------
  
      Perfect labelings are homogeneous::
  
        >>> from sklearn.metrics.cluster import homogeneity_score
        >>> homogeneity_score([0, 0, 1, 1], [1, 1, 0, 0])
        1.0
  
      Non-perfect labelings that further split classes into more clusters can be
      perfectly homogeneous::
  
        >>> print("%.6f" % homogeneity_score([0, 0, 1, 1], [0, 0, 1, 2]))
        ...                                                  # doctest: +ELLIPSIS
        1.0...
        >>> print("%.6f" % homogeneity_score([0, 0, 1, 1], [0, 1, 2, 3]))
        ...                                                  # doctest: +ELLIPSIS
        1.0...
  
      Clusters that include samples from different classes do not make for an
      homogeneous labeling::
  
        >>> print("%.6f" % homogeneity_score([0, 0, 1, 1], [0, 1, 0, 1]))
        ...                                                  # doctest: +ELLIPSIS
        0.0...
        >>> print("%.6f" % homogeneity_score([0, 0, 1, 1], [0, 0, 0, 0]))
        ...                                                  # doctest: +ELLIPSIS
        0.0...
  
      """
      return homogeneity_completeness_v_measure(labels_true, labels_pred)[0]
function_tokens: def homogeneity_score ( labels_true , labels_pred ) : return homogeneity_completeness_v_measure ( labels_true , labels_pred ) [ 0 ]