
In this lesson, we draw the fundamental distinction between supervised and unsupervised learning paradigms. You'll understand when to apply each approach, the role of labelled data, and how common algorithms fit within each category.
Code snippet from this lesson
from sklearn.linear_model import LogisticRegression from sklearn.cluster import KMeans # Supervised: requires labels (y_train) clf = LogisticRegression() clf.fit(X_train, y_train) # Unsupervised: no labels needed kmeans = KMeans(n_clusters=3) kmeans.fit(X_train)