• Descriptive
    • Moments
    • Concentration
    • Central Tendency
    • Variability
    • Stem-and-Leaf Plot
    • Histogram & Frequency Table
    • Data Quality Forensics
    • Conditional EDA
    • Quantiles
    • Kernel Density Estimation
    • Normal QQ Plot
    • Bootstrap Plot

    • Multivariate Descriptive Statistics
  • Distributions
    • Binomial Probabilities
    • Geometric Probabilities
    • Negative Binomial Probabilities
    • Hypergeometric Probabilities
    • Multinomial Probabilities
    • Dirichlet
    • Poisson Probabilities

    • Exponential
    • Gamma
    • Erlang
    • Weibull
    • Rayleigh
    • Maxwell-Boltzmann
    • Lognormal
    • Pareto
    • Inverse Gamma
    • Inverse Chi-Square

    • Beta
    • Power
    • Beta Prime (Inv. Beta)
    • Triangular

    • Normal (area)
    • Logistic
    • Laplace
    • Cauchy (standard)
    • Cauchy (location-scale)
    • Gumbel
    • Fréchet
    • Generalized Extreme Value

    • Normal RNG
    • ML Fitting
    • Tukey Lambda PPCC
    • Box-Cox Normality Plot
    • Noncentral t
    • Noncentral F
    • Sample Correlation r

    • Empirical Tests
  • Hypotheses
    • Theoretical Aspects of Hypothesis Testing
    • Bayesian Inference
    • Minimum Sample Size

    • Empirical Tests
    • Multivariate (pair-wise) Testing
  • Models
    • Manual Model Building
    • Guided Model Building
  • Time Series
    • Time Series Plot
    • Decomposition
    • Exponential Smoothing

    • Blocked Bootstrap Plot
    • Mean Plot
    • (P)ACF
    • VRM
    • Standard Deviation-Mean Plot
    • Spectral Analysis
    • ARIMA

    • Cross Correlation Function
    • Granger Causality
  1. Model Building Strategies
  2. 158  Introduction to Model Building Strategies
  • Preface
  • Getting Started
    • 1  Introduction
    • 2  Why Do We Need Innovative Technology?
    • 3  Basic Definitions
    • 4  The Big Picture: Why We Analyze Data
  • Introduction to Probability
    • 5  Definitions of Probability
    • 6  Jeffreys’ axiom system
    • 7  Bayes’ Theorem
    • 8  Sensitivity and Specificity
    • 9  Naive Bayes Classifier
    • 10  Law of Large Numbers

    • 11  Problems
  • Probability Distributions
    • 12  Bernoulli Distribution
    • 13  Binomial Distribution
    • 14  Geometric Distribution
    • 15  Negative Binomial Distribution
    • 16  Hypergeometric Distribution
    • 17  Multinomial Distribution
    • 18  Poisson Distribution

    • 19  Uniform Distribution (Rectangular Distribution)
    • 20  Normal Distribution (Gaussian Distribution)
    • 21  Gaussian Naive Bayes Classifier
    • 22  Chi Distribution
    • 23  Chi-squared Distribution (1 parameter)
    • 24  Chi-squared Distribution (2 parameters)
    • 25  Student t-Distribution
    • 26  Fisher F-Distribution
    • 27  Exponential Distribution
    • 28  Lognormal Distribution
    • 29  Gamma Distribution
    • 30  Beta Distribution
    • 31  Weibull Distribution
    • 32  Pareto Distribution
    • 33  Inverse Gamma Distribution
    • 34  Rayleigh Distribution
    • 35  Erlang Distribution
    • 36  Logistic Distribution
    • 37  Laplace Distribution
    • 38  Gumbel Distribution
    • 39  Cauchy Distribution
    • 40  Triangular Distribution
    • 41  Power Distribution
    • 42  Beta Prime Distribution
    • 43  Sample Correlation Distribution
    • 44  Dirichlet Distribution
    • 45  Generalized Extreme Value (GEV) Distribution
    • 46  Frechet Distribution
    • 47  Noncentral t Distribution
    • 48  Noncentral F Distribution
    • 49  Inverse Chi-Squared Distribution
    • 50  Maxwell-Boltzmann Distribution
    • 51  Distribution Relationship Map

    • 52  Problems
  • Descriptive Statistics & Exploratory Data Analysis
    • 53  Types of Data
    • 54  Datasheets

    • 55  Frequency Plot (Bar Plot)
    • 56  Frequency Table
    • 57  Contingency Table
    • 58  Binomial Classification Metrics
    • 59  Confusion Matrix
    • 60  ROC Analysis

    • 61  Stem-and-Leaf Plot
    • 62  Histogram
    • 63  Data Quality Forensics
    • 64  Quantiles
    • 65  Central Tendency
    • 66  Variability
    • 67  Skewness & Kurtosis
    • 68  Concentration
    • 69  Notched Boxplot
    • 70  Scatterplot
    • 71  Pearson Correlation
    • 72  Rank Correlation
    • 73  Partial Pearson Correlation
    • 74  Simple Linear Regression
    • 75  Moments
    • 76  Quantile-Quantile Plot (QQ Plot)
    • 77  Normal Probability Plot
    • 78  Probability Plot Correlation Coefficient Plot (PPCC Plot)
    • 79  Box-Cox Normality Plot
    • 80  Kernel Density Estimation
    • 81  Bivariate Kernel Density Plot
    • 82  Conditional EDA: Panel Diagnostics
    • 83  Bootstrap Plot (Central Tendency)
    • 84  Survey Scores Rank Order Comparison
    • 85  Cronbach Alpha

    • 86  Equi-distant Time Series
    • 87  Time Series Plot (Run Sequence Plot)
    • 88  Mean Plot
    • 89  Blocked Bootstrap Plot (Central Tendency)
    • 90  Standard Deviation-Mean Plot
    • 91  Variance Reduction Matrix
    • 92  (Partial) Autocorrelation Function
    • 93  Periodogram & Cumulative Periodogram

    • 94  Problems
  • Hypothesis Testing
    • 95  Normal Distributions revisited
    • 96  The Population
    • 97  The Sample
    • 98  The One-Sided Hypothesis Test
    • 99  The Two-Sided Hypothesis Test
    • 100  When to use a one-sided or two-sided test?
    • 101  What if \(\sigma\) is unknown?
    • 102  The Central Limit Theorem (revisited)
    • 103  Statistical Test of the Population Mean with known Variance
    • 104  Statistical Test of the Population Mean with unknown Variance
    • 105  Statistical Test of the Variance
    • 106  Statistical Test of the Population Proportion
    • 107  Statistical Test of the Standard Deviation \(\sigma\)
    • 108  Statistical Test of the difference between Means -- Independent/Unpaired Samples
    • 109  Statistical Test of the difference between Means -- Dependent/Paired Samples
    • 110  Statistical Test of the difference between Variances -- Independent/Unpaired Samples

    • 111  Hypothesis Testing for Research Purposes
    • 112  Decision Thresholds, Alpha, and Confidence Levels
    • 113  Bayesian Inference for Decision-Making
    • 114  One Sample t-Test
    • 115  Skewness & Kurtosis Tests
    • 116  Paired Two Sample t-Test
    • 117  Wilcoxon Signed-Rank Test
    • 118  Unpaired Two Sample t-Test
    • 119  Unpaired Two Sample Welch Test
    • 120  Two One-Sided Tests (TOST) for Equivalence
    • 121  Mann-Whitney U test (Wilcoxon Rank-Sum Test)
    • 122  Bayesian Two Sample Test
    • 123  Median Test based on Notched Boxplots
    • 124  Chi-Squared Tests for Count Data
    • 125  Kolmogorov-Smirnov Test
    • 126  One Way Analysis of Variance (1-way ANOVA)
    • 127  Kruskal-Wallis Test
    • 128  Two Way Analysis of Variance (2-way ANOVA)
    • 129  Repeated Measures ANOVA
    • 130  Friedman Test
    • 131  Testing Correlations
    • 132  A Note on Causality

    • 133  Problems
  • Regression Models
    • 134  Simple Linear Regression Model (SLRM)
    • 135  Multiple Linear Regression Model (MLRM)
    • 136  Logistic Regression
    • 137  Generalized Linear Models
    • 138  Multinomial and Ordinal Logistic Regression
    • 139  Cox Proportional Hazards Regression
    • 140  Conditional Inference Trees
    • 141  Leaf Diagnostics for Conditional Inference Trees
    • 142  Conditional Random Forests
    • 143  Hypothesis Testing with Linear Regression Models (from a Practical Point of View)

    • 144  Problems
  • Introduction to Time Series Analysis
    • 145  Case: the Market of Health and Personal Care Products
    • 146  Decomposition of Time Series
    • 147  Ad hoc Forecasting of Time Series
  • Box-Jenkins Analysis
    • 148  Introduction to Box-Jenkins Analysis
    • 149  Theoretical Concepts
    • 150  Stationarity
    • 151  Identifying ARMA parameters
    • 152  Estimating ARMA Parameters and Residual Diagnostics
    • 153  Forecasting with ARIMA models
    • 154  Intervention Analysis
    • 155  Cross-Correlation Function
    • 156  Transfer Function Noise Models
    • 157  General-to-Specific Modeling
  • Model Building Strategies
    • 158  Introduction to Model Building Strategies
    • 159  Manual Model Building
    • 160  Model Validation
    • 161  Regularization Methods
    • 162  Hyperparameter Optimization Strategies
    • 163  Guided Model Building in Practice
    • 164  Diagnostics, Revision, and Guided Forecasting
    • 165  Leakage, Target Encoding, and Robust Regression
  • References
  • Appendices
    • Appendices
    • A  Method Selection Guide
    • B  Presentations and Teaching Materials
    • C  R Language Concepts for Statistical Computing
    • D  Matrix Algebra
    • E  Standard Normal Table (Gaussian Table)
    • F  Critical values of Student’s \(t\) distribution with \(\nu\) degrees of freedom
    • G  Upper-tail critical values of the \(\chi^2\)-distribution with \(\nu\) degrees of freedom
    • H  Lower-tail critical values of the \(\chi^2\)-distribution with \(\nu\) degrees of freedom

Table of contents

  • 158.1 The Model Building Process
  • 158.2 Prediction and Explanation as Modeling Goals
  • 158.3 Single Models and Ensemble Methods
  • 158.4 Regularization and Hyperparameter Selection
  • 158.5 Manual and Guided Workflows
  • 158.6 The Role of Validation
  • 158.7 Structure of This Part
  1. Model Building Strategies
  2. 158  Introduction to Model Building Strategies

158  Introduction to Model Building Strategies

Model building is a sequence of decisions. Each decision — which target to model, which predictors to include, which method to use, how to validate, whether to revise — affects the result and should be documented. This chapter introduces the vocabulary and structure used throughout the rest of this part.

158.1 The Model Building Process

A complete model building workflow consists of stages that are visited in order but can be revisited when diagnostics or domain knowledge require a revision.

Stage What happens Where it is covered
Data Choose the dataset, identify the target variable, select candidate predictors, and declare group structure or predictor-availability exceptions when needed Chapter 63, Chapter 163
Audit Inspect warnings about missingness, outliers, leakage, delayed variables, and distributional problems before fitting Chapter 163, Chapter 165
Strategy Decide on preprocessing, candidate models, validation method, and whether a locked final test is needed Chapter 163, Chapter 164
Fit Train one or more candidate models on the training data Chapter 135, Chapter 136, Chapter 140, Chapter 142
Validate Evaluate each candidate on held-out data, repeated resamples, and sometimes a separate final confirmation split Chapter 160, Chapter 164
Diagnose Inspect residuals, calibration, discrimination, or forecast behavior Chapter 164
Revise Test an alternative path and decide whether it should replace the current model Chapter 164
Report Export the reasoning, the code, and the results Chapter 163

The point of this table is not that every analysis must pass through every stage. The point is that skipping a stage should be a conscious decision, not an accident.

158.2 Prediction and Explanation as Modeling Goals

The first decision in any modeling workflow is the goal. The choice between prediction and explanation changes how redundancy, validation, interpretability, and diagnostics are weighted.

Dimension Prediction Explanation / Confirmation
Goal minimize error on unseen cases understand which predictors matter and how
Preferred models any model that generalizes well, including ensembles and flexible methods models with directly interpretable structure (coefficients, tree diagrams, or rule sets)
Key metric held-out RMSE, MAE, AUC, accuracy interpretability of fitted structure, effect direction, residual structure
Variable selection automated selection and regularization are acceptable substantive reasoning guides which predictors enter the model
Complexity higher complexity is acceptable if validation supports it simpler models are preferred when they explain the phenomenon adequately

This distinction appears in Chapter 136 (where logistic regression serves both goals), in Chapter 60 (where AUC measures predictive discrimination), and in Chapter 140 (where tree structure provides an alternative to coefficient interpretation). The Guided Model Building app (Chapter 163) asks the user to declare this goal before the first model is fitted.

158.3 Single Models and Ensemble Methods

The models discussed in earlier chapters — linear regression (Chapter 135), logistic regression (Chapter 136), conditional inference trees (Chapter 140) — are single models. Each produces one set of predictions from one fitted structure.

An ensemble combines the predictions of multiple models to produce a result that is often more stable or more accurate than any single member. Three families are commonly distinguished:

Family Idea Main effect Example
Bagging fit the same model type on resampled copies of the data and average the predictions reduces variance conditional random forest (cforest)
Boosting fit models sequentially, each one correcting the errors of the previous one reduces bias gradient boosting
Stacking train several different model types and combine their predictions through a second-level model exploits complementary strengths stacked generalization

The Guided Model Building app already includes cforest from the party package as a candidate model. A conditional random forest is a bagging-style ensemble built from many conditional inference trees. Unlike a single tree, the forest is not directly interpretable as a decision diagram, but it typically produces lower prediction error because the averaging across trees reduces the instability that affects any individual tree. The details of this tradeoff are developed in Chapter 142.

Boosting and stacked ensembles are still planned for later in this part.

158.4 Regularization and Hyperparameter Selection

When a model has many predictors relative to the number of observations, ordinary fitting can produce large and unstable coefficients. Regularization addresses this by adding a penalty term to the fitting criterion that shrinks coefficients toward zero.

Two standard forms are widely used:

  • Ridge regression adds a penalty proportional to the sum of squared coefficients. It shrinks all coefficients but keeps every predictor in the model.
  • Lasso regression adds a penalty proportional to the sum of absolute coefficients. It can shrink some coefficients exactly to zero, effectively performing variable selection as part of the fitting process.

The penalty strength is controlled by a hyperparameter — a model setting that is not estimated from the data itself but must be chosen before fitting begins. The standard way to choose a hyperparameter is by validation: fit the model at several candidate values and select the value that produces the best held-out performance (see Chapter 160).

Hyperparameter selection is not limited to regularization. Any model setting that must be fixed before fitting counts as a hyperparameter: the depth of a tree, the number of trees in a forest, the smoothing bandwidth in a kernel density estimate, or the Laplace correction in a Naive Bayes classifier (Chapter 21). What these settings share is that they control model complexity and should be chosen by validation rather than by convenience.

The next two chapters return to these ideas in concrete form: Chapter 161 treats ridge, lasso, and elastic net, while Chapter 162 treats systematic tuning strategies more generally.

158.5 Manual and Guided Workflows

This part of the book covers two levels of workflow support:

  • Manual model building (Chapter 159): the user selects a dataset, fits individual models one at a time, and compares results by reading the output directly. In this handbook, the primary tool for this approach is the app available in the menu Models / Manual Model Building.
  • Guided model building (Chapter 163): the Guided Model Building app automates the audit, strategy, fitting, validation, and export stages while keeping every methodological choice visible for review and revision.

Fully automated model building (AutoML) — where the system searches over model families, preprocessing pipelines, and hyperparameters without user intervention — is a third level that exists in practice but is not covered in this handbook. The educational goal here is to make the reasoning behind each modeling decision explicit, which requires the user to remain involved at every stage.

158.6 The Role of Validation

A model that fits the training data well is not necessarily a model that will perform well on new data. The difference between training performance and held-out performance is the central problem that validation addresses. If a model has been allowed to memorize the training data — by using too many parameters, by overfitting noise, or by leaking target information into the predictors — it will appear excellent on training data and fail on new observations.

The next chapter (Chapter 160) introduces the validation methods used throughout this part: single holdout splits, repeated holdout, stratified holdout, rolling-origin validation for time series, and k-fold cross-validation.

In the Guided Model Building app, predictive defaults are therefore not based on one lucky split. They are based on repeated-validation summaries. This matters when you read the stability boxplots in the later guided chapters: the line inside a boxplot is the median resample performance, but the app’s automatic ranking uses the mean repeated-validation performance. If the resample distribution is skewed, a model with the highest median need not be the model with the highest mean.

Validation also has a second role beyond average accuracy: it reveals reliability. Two models can have similar mean RMSE, AUC, or accuracy while one of them varies much more across resamples. A model with slightly weaker average performance but clearly lower variability may be easier to trust in practice because its behavior is less dependent on the particular split.

For binary classification, the same comparison can be read through more than one lens. AUC emphasizes ranking and discrimination across thresholds; AUCPR emphasizes the tradeoff between precision and recall and becomes especially useful when the positive class is rare or when false positives are costly. The guided workflow therefore uses AUC for automatic default ranking but also shows AUCPR as a complementary perspective when precision matters more than sensitivity.

In confirmatory workflows, validation can be made stricter still by reserving a locked final test set. The model is built and revised on the remaining analysis subset, while the final split is kept hidden until the analyst is ready for an explicit last check. This is not needed in every exercise, but it is an important safeguard when the objective is confirmation rather than exploratory optimization.

158.7 Structure of This Part

Chapter Focus
Introduction to Model Building Strategies (this chapter) vocabulary, goals, and workflow overview
Manual Model Building (Chapter 159) hands-on classification with the app in the menu Models / Manual Model Building
Model Validation (Chapter 160) holdout, repeated holdout, stratified splits, rolling-origin, comparison metrics
Regularization Methods (Chapter 161) ridge, lasso, elastic net, and coefficient shrinkage by validation
Hyperparameter Optimization Strategies (Chapter 162) grid search, random search, and tuning forests or penalties by held-out performance
Guided Model Building in Practice (Chapter 163) full-screen tabular workflows with audit, strategy, fitting, and export
Diagnostics, Revision, and Guided Forecasting (Chapter 164) revision logic, forecasting workflows, and model promotion
Leakage, Target Encoding, and Robust Regression (Chapter 165) leakage protection, predictor availability, grouped splitting, fold-safe target encoding, and Huber regression
Boosting and Stacked Ensemble Methods (planned) boosting, stacking, and more advanced ensembles beyond cforest
Model Building Strategies
159  Manual Model Building

© 2026 Patrick Wessa. Provided as-is, without warranty.

Feedback: e-mail | Anonymous contributions: click to copy (Sats) | click to copy (XMR)

Cookie Preferences