Professional Documents
Culture Documents
TranMinhTu KTGK
TranMinhTu KTGK
1 13.89
2 13.53
3 13.21
4 13.27
Cột: K: Potassium
Giá trị nhỏ nhất: 0.0
Giá trị lớn nhất: 6.21
Giá trị trung bình: 0.4970560747663551
Cột: label
Giá trị nhỏ nhất: 1
Giá trị lớn nhất: 7
Giá trị trung bình: 2.7803738317757007
/usr/local/lib/python3.10/dist-packages/sklearn/model_selection/
_split.py:700: UserWarning: The least populated class in y has only 9
members, which is less than n_splits=10.
warnings.warn(
/usr/local/lib/python3.10/dist-packages/sklearn/model_selection/_split
.py:700: UserWarning: The least populated class in y has only 9
members, which is less than n_splits=10.
warnings.warn(
/usr/local/lib/python3.10/dist-packages/sklearn/model_selection/_split
.py:700: UserWarning: The least populated class in y has only 9
members, which is less than n_splits=10.
warnings.warn(
/usr/local/lib/python3.10/dist-packages/sklearn/model_selection/_split
.py:700: UserWarning: The least populated class in y has only 9
members, which is less than n_splits=10.
warnings.warn(
/usr/local/lib/python3.10/dist-packages/sklearn/model_selection/_split
.py:700: UserWarning: The least populated class in y has only 9
members, which is less than n_splits=10.
warnings.warn(
/usr/local/lib/python3.10/dist-packages/sklearn/model_selection/_split
.py:700: UserWarning: The least populated class in y has only 9
members, which is less than n_splits=10.
warnings.warn(
/usr/local/lib/python3.10/dist-packages/sklearn/model_selection/_split
.py:700: UserWarning: The least populated class in y has only 9
members, which is less than n_splits=10.
warnings.warn(
/usr/local/lib/python3.10/dist-packages/sklearn/model_selection/_split
.py:700: UserWarning: The least populated class in y has only 9
members, which is less than n_splits=10.
warnings.warn(
/usr/local/lib/python3.10/dist-packages/sklearn/model_selection/_split
.py:700: UserWarning: The least populated class in y has only 9
members, which is less than n_splits=10.
warnings.warn(
/usr/local/lib/python3.10/dist-packages/sklearn/model_selection/
_split.py:700: UserWarning: The least populated class in y has only 9
members, which is less than n_splits=10.
warnings.warn(
# K-Means clustering
kmeans = KMeans(n_clusters=len(data['label'].unique()))
kmeans_labels = kmeans.fit_predict(X_scaled)
print("\nAdjusted Rand Index for K-Means:", adjusted_rand_score(y,
kmeans_labels))
# DBSCAN clustering
dbscan = DBSCAN(eps=0.5, min_samples=5)
dbscan_labels = dbscan.fit_predict(X_scaled)
print("Adjusted Rand Index for DBSCAN:", adjusted_rand_score(y,
dbscan_labels))
/usr/local/lib/python3.10/dist-packages/sklearn/cluster/
_kmeans.py:870: FutureWarning: The default value of `n_init` will
change from 10 to 'auto' in 1.4. Set the value of `n_init` explicitly
to suppress the warning
warnings.warn(