liveBook · Manning

Hyperparameter

As explained in Fight Fraud with Machine Learning

A hyperparameter is a configuration value selected before or during model training that controls the model or training procedure.

A hyperparameter is a setting chosen by the model developer before or during training that influences how a machine-learning model learns. Unlike model parameters, which training learns from data, hyperparameters define the conditions of learning. Examples include learning rate, maximum tree depth, class weights, number of epochs, and optimizer weight decay. section 3.1 section 9.2.3

Use hyperparameters to configure the training workflow:

  • Select settings appropriate to the model, such as tree depth for tree-based fraud models or learning rate and epochs for neural networks. section 3.1 section 9.2.3
  • Pair the model with a loss function and optimizer; the MLP example uses cross entropy, Adam, and weight decay. section 9.2.3
  • Run training, validate across epochs, inspect loss and evaluation metrics, and try alternative values to observe their effects. section 9.2.3

MLP for illicit Bitcoin transactions

An MLP configuration sets NUM_EPOCHS to 1000, the learning rate to 0.01, cross-entropy loss, and Adam with weight decay of 1e-4. Training updates learned parameters; validation accuracy and F1 are tracked across epochs before final test evaluation. section 9.2.3

Figure 9.10 Steps to train and evaluate the MLP model, starting with setting model hyperparameters, running the model training loop, and evaluating the model performance on the test set.

The workflow diagram connects hyperparameter selection with the training loop and test evaluation. section 9.2.3

How Fight Fraud with Machine Learning covers it

How deep it goes
Defines hyperparameters, distinguishes them from learned parameters, and demonstrates selection, training, validation, and metric inspection.
Examples
Uses tree depth and class weights for classical models, then gives an MLP configuration with epochs, learning rate, Adam, and weight decay.
What it assumes
Assumes familiarity with machine-learning models and training, while explaining from basics how settings differ from learned parameters.
What you can do after
Apply hyperparameters via Torch to train, validate, and evaluate neural fraud-detection models while comparing learning behavior and metrics.
How it connects
Connects model parameters, feature engineering, loss functions, optimizers, learning rate, epochs, class weights, and tree depth.

Also explained in

Compare how 26 books explain hyperparameter →

Related concepts

This explainer was generated by Manning's knowledge graph from the text of Fight Fraud with Machine Learning. The section links point to the parts of the book it draws on.