Unsupervised Learning
/ˌʌnsupərˈvaɪzd ˈlɜːrnɪŋ/
Unsupervised Learning: Unsupervised learning finds structure in data without target labels. Its objectives include grouping similar observations, compressing representations and estimating the data distribution. Instead of learning a mapping from inputs to known targets, the model optimizes an intrinsic criterion.
In italiano: Apprendimento Non SupervisionatoLegge III · Come una rete impara dai datiInstead of learning a mapping from inputs to known targets, the model optimizes an intrinsic criterion. Clustering minimizes within-group dissimilarity, dimensionality reduction preserves selected structure with fewer variables, and density estimation models which observations are likely. Supervised learning, by contrast, measures error against provided labels.
Formula
K-means: min Σᵢ ‖xᵢ − μ_zᵢ‖₂², where zᵢ is the cluster assigned to xᵢ
Numerical example
import numpy as np
x = np.array([[0.0, 0.0], [0.2, 0.1], [3.0, 3.0], [3.1, 2.9]])
centroids = np.array([[0.0, 0.0], [3.0, 3.0]])
distances = np.sum((x[:, None, :] - centroids) ** 2, axis=2)
clusters = distances.argmin(axis=1) # [0, 0, 1, 1]When to use it
Use unsupervised methods for exploratory analysis, customer segmentation, anomaly detection, compression and representation learning when labeled targets are absent or expensive.
Limitations
Unsupervised objectives do not establish that discovered groups are causally meaningful or useful for a downstream task. Evaluation often needs domain knowledge, stability checks or a separate labeled validation set.
Examples
- Customer segmentation
- Topic modeling
- Anomaly detection