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 furthermore symmetric: switching label_true with
label_pred will return the same score value. This can be useful to
measure the agreement of two independent label assignments strategies
on the same dataset when the real ground truth is not known.
Ground truth class labels to be used as a reference.
labels_pred : array-like of shape (n_samples,)
Cluster labels to evaluate.
beta : float, default=1.0
Ratio of weight attributed to homogeneity vs completeness.
If beta is greater than 1, completeness is weighted more
strongly in the calculation. If beta is less than 1,
homogeneity is weighted more strongly.
Returns:
v_measure : float
Score between 0.0 and 1.0. 1.0 stands for perfectly complete labeling.
Labelings that have pure clusters with members coming from the same
classes are homogeneous but un-necessary splits harm completeness
and thus penalize V-measure as well: