The iris dataset has 150 flowers, four measurements each, and a hidden answer: three species. Pretend you never saw the species, cluster the flowers, and only afterwards check how well the clusters match.
All four iris columns are in centimetres. So does scaling help here, as it did for the wine?
Task: write iris_match(k, scale).
load_iris(return_X_y=True).scale is True, scale the features with StandardScaler().fit_transform(X). If it is False, use them as they are.KMeans(n_clusters=k, random_state=0, n_init=10) on those features.adjusted_rand_score(y, labels) as a plain float, rounded to 3 decimal places.