liveBook · Manning

Hyperparameter

As explained in Data Without Labels

A hyperparameter is a configuration value selected before or during model training that controls an algorithm's behavior or structure.

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

How Data Without Labels covers it

How deep it goes
Defines the term, identifies algorithm-specific settings, and outlines repeated training and evaluation without prescribing a universal selection rule.
Examples
Uses customer-segmentation iterations and a DBSCAN fit with explicit neighborhood settings.
What it assumes
Introduces hyperparameters from clustering controls, while relying on neural-network concepts when discussing autoencoder settings.
What you can do after
Practice/perform iterative tuning by changing settings, measuring performance, and checking whether resulting clusters meet business needs.
How it connects
Links hyperparameters to k-means, hierarchical clustering, DBSCAN, autoencoders, and mini-batch gradient descent.

Also explained in

Compare how 19 books explain hyperparameter →

Related concepts

This explainer was generated by Manning's knowledge graph from the text of Data Without Labels. The section links point to the parts of the book it draws on.