A hyperparameter is a setting you supply to control how an algorithm runs or how a model is structured. In clustering, the number of clusters or a linkage criterion changes how observations are grouped. In a neural network, choices such as hidden-layer count and activation functions shape the network before its performance can be evaluated. section 2.4.2 section 8.2.5
The setting depends on the algorithm:
- K-means uses k to set the number of clusters. Hierarchical clustering can use different linkage criteria, including single, complete, group average, and Ward linkage. section 2.4.2
- DBSCAN uses a neighborhood radius, ε, and a minimum point count, minPts. Changing either can change which observations qualify as core points and how clusters form. section 2.5.2
- An autoencoder requires choices about its middle-layer code size, depth, nodes per layer, and loss function. A smaller code size compresses data more; greater depth increases complexity and processing time. section 9.5
- Mini-batch gradient descent adds batch size as a setting to tune; example sizes include 32, 64, 128, and 256. section 8.2.6
db_default = DBSCAN(eps = 0.0375, min_samples = 6).fit(X_standard) labels = db_default.labels_
The DBSCAN fit call makes two settings visible: eps supplies the neighborhood radius, and min_samples supplies the minimum point threshold. The resulting labels can be inspected after fitting. section 2.5.2
Tune rather than assume a setting is best: choose reasonable values, train, measure performance, adjust, and repeat. For customer segmentation, inspect the resulting cluster sizes and distinguishing attributes alongside business needs. Customer variables such as visits and revenue describe the observations being clustered; they serve a different role from settings that control the algorithm. section 8.2.5 section 2.6.4


















