DBSCAN struggles in 13 dimensions, where everything is far from everything. Squash the wine data with PCA first and try again.
Task: write density_groups(n_components, eps, min_samples).
load_wine(return_X_y=True, as_frame=True) and scale the 13 columns with StandardScaler().fit_transform(X).PCA(n_components=n_components).fit_transform(...).DBSCAN(eps=eps, min_samples=min_samples) on the reduced data."sizes": the number of wines in each cluster, sorted from largest to smallest, with noise left out"noise": how many wines were labelled -1"match": adjusted_rand_score(y, labels) with the labels exactly as DBSCAN gave them, as a plain float rounded to 3 decimal placesIf every wine is noise, "sizes" is an empty list.