An entirely complete clustering is one where each cluster has information that directs a place toward a similar class cluster. Completeness portrays the closeness of the clustering algorithm to this (completeness_score) perfection.
This metric is autonomous of the outright values of the labels. A permutation of the cluster label values won’t change the score value in any way.
Syntax: sklearn.metrics.completeness_score(labels_true, labels_pred)
- labels_true:<int array, shape = [n_samples]>: It accepts the ground truth class labels to be used as a reference.
- labels_pred: <array-like of shape (n_samples,)>: It accepts the cluster labels to evaluate.
Returns: completeness score between 0.0 and 1.0. 1.0 stands for perfectly completeness labeling.
Switching label_true with label_pred will return the homogeneity_score.
Example 2: Perfectly completeness:
Example 3: Non-perfect labeling that further split classes into more clusters can be perfectly completeness:
Example 4: Include samples from different classes don’t make for completeness labeling:
Attention geek! Strengthen your foundations with the Python Programming Foundation Course and learn the basics.
To begin with, your interview preparations Enhance your Data Structures concepts with the Python DS Course.
- Calculating Areas Of Different Shapes Using Python
- Python | Decision Tree Regression using sklearn
- Python | Linear Regression using sklearn
- homogeneity_score using sklearn in Python
- Calculating Wind Chill Factor(WCF) or Wind Chill Index(WCI) in Python
- ML | Implementation of KNN classifier using Sklearn
- ML | Dummy classifiers using sklearn
- Implementing DBSCAN algorithm using Sklearn
- Implementing Agglomerative Clustering using Sklearn
- ML | Implementing L1 and L2 regularization using Sklearn
- ML | OPTICS Clustering Implementing using Sklearn
- ML | Ridge Regressor using sklearn
- ML | Voting Classifier using Sklearn
- Calculating the sum of all columns of a 2D NumPy array
- ML | sklearn.linear_model.LinearRegression() in Python
- How to use datasets.fetch_mldata() in sklearn - Python?
- sklearn.cross_decomposition.PLSRegression() function in Python
- sklearn.metrics.max_error() function in Python
- Sklearn.StratifiedShuffleSplit() function in Python
- Sklearn | Feature Extraction with TF-IDF
If you like GeeksforGeeks and would like to contribute, you can also write an article using contribute.geeksforgeeks.org or mail your article to email@example.com. See your article appearing on the GeeksforGeeks main page and help other Geeks.
Please Improve this article if you find anything incorrect by clicking on the "Improve Article" button below.