Data, Python, Machine Learning, Data Science, AI.
Iris dataset: import numpy as np import pandas as pd from sklearn.cluster import KMeans from sklearn.datasets import load_iris import matplotlib.pyplot as plt # Load the Iris dataset data = load_iris() df = pd.DataFrame(data.data, columns=data.feature_names) # Perform K-means clustering with 3