Machine Learning, Data Science, Data Scientist, Mlops, Algorithms.
iris.data # Applying K-Means Clustering kmeans = KMeans(n_clusters=3, random_state=42) kmeans.fit(X) # Predicting the cluster for each data point y_pred_clusters = kmeans.predict(X) # Evaluating the model inertia = kmeans.inertia_ silhouette = silhouette_score(X, y_pred_clusters) print("Inertia:",