Recommended resources
The freely available resources this lesson will direct you to.
- Hypothesis Space and Inductive Biaswww.youtube.com
- Lecture 8 - Data Splits, Models & Cross-Validation | Stanford CS229: Machine Learning (Autumn 2018)www.youtube.com
- Model evaluation, model selection, and algorithm selection in machine learning | Sebastian Raschka, PhDsebastianraschka.com
- Hyperparameter optimization: Foundations, algorithms, ...epub.ub.uni-muenchen.de
Welcome to our third lesson. In our previous discussion, we created a high-level map of the machine learning landscape, distinguishing between the supervised, unsupervised, and reinforcement learning paradigms. We are now prepared to zoom into the most common of these—supervised learning—and dissect its fundamental components.
The goal of this lesson is to define three essential concepts that form the theoretical bedrock of model building: hypothesis spaces, model parameters, and hyperparameters. Understanding the precise roles of and distinctions between these terms is critical for the overarching process of model selection—the methodical procedure of choosing a function that not only fits your data but also generalizes well to new, unseen examples.
The Anatomy of a Learning Problem
At its core, supervised learning is a problem of function approximation. We assume there is some true, unknown target function, , that perfectly maps inputs to outputs. We don't have access to this function directly. Instead, we have a set of training examples, , which are noisy samples from this true function.
The task of a learning algorithm is to use these training examples to produce a final hypothesis, , which is our best guess at the true target function . The algorithm selects this hypothesis from a predefined set of possibilities. This entire process is visualized in the following flowchart.

Let's now formally define the key components of this process.
Hypothesis Space: The Universe of Possibilities
Before any learning can occur, we must first decide on the class of functions our algorithm is allowed to consider. This pre-defined "universe" of all candidate functions is called the hypothesis space, denoted by .
A hypothesis () is simply one specific function from this space. For example, if we are predicting house prices from their size, one hypothesis might be , while another might be .
The choice of learning algorithm implicitly defines the hypothesis space.
- If you choose to use linear regression, your hypothesis space is the set of all linear functions of the input features.
- If you choose to use decision trees, your hypothesis space is the set of all possible trees you can form using your features.
The following video provides an excellent formal introduction to the concept of a hypothesis space. It explains how the choice of features and the "language" (the class of functions) together define the space from which a learning algorithm must select its final model.
Hypothesis Space and Inductive Bias
This lecture provides a clear, academic definition of the hypothesis space and related terminology.
Please watch the following segments: The introduction, which sets up the problem of learning a function from data in a feature space. The definition of hypothesis space. Pay close attention to the statement that the learning algorithm searches this space. The terminology section, which distinguishes between the true (and unknown) concept c and the learned hypothesis h. The example of the size of the hypothesis space for Boolean functions. This illustrates why constraints (a "bias") are necessary for learning to be feasible.
As the video illustrates, the hypothesis space can be astronomically large. Given your background in computer science, you can think of the hypothesis space as being analogous to the set of all valid programs that can be expressed in a given programming language. A learning algorithm's job is to search this vast space for a single "program" (the final hypothesis) that best fits the training data according to some objective.
Model Parameters vs. Hyperparameters
Now that we have defined the space of possible models, we need to distinguish between the two types of "knobs" we can turn: those the algorithm adjusts automatically and those we must set manually.

Model Parameters (e.g., )
Model parameters are the variables that the learning algorithm learns from the training data. They are internal to the model and are the direct output of the training process. Once these parameters are learned, they define a specific hypothesis from the hypothesis space .
Consider a simple linear regression model: .
- The hypothesis space is the set of all straight lines.
- The model parameters are the coefficients (the intercept) and (the slope).
- The learning algorithm's task is to find the specific values of and that make the line best fit the training data.
Hyperparameters (e.g., )
Hyperparameters, in contrast, are configuration settings that are set by you before the learning process begins. They are external to the model and are not learned from the data. Instead, they control how the learning algorithm finds the optimal model parameters.
Consider a regularized linear regression model (which we'll study in detail later). The objective is to find parameters that not only fit the data but also have small values to prevent overfitting.
- The model parameters are still the coefficients .
- A crucial hyperparameter is the regularization strength, . This value controls the penalty for large parameter values. You must choose a value for before you start training. Different values of will cause the algorithm to learn different model parameters .
The following resources provide formal, academic definitions that clearly delineate these concepts.
This article by Sebastian Raschka provides concise definitions of the key terms we've discussed.
Please navigate to the section "Assumptions and Terminology." Read the bulleted list from target function to hyperparameters. This text explicitly contrasts model parameters (what the algorithm fits) with hyperparameters (what you tune).
For a more formal and in-depth treatment, the following paper on hyperparameter optimization (HPO) defines these terms from first principles.
Hyperparameter optimization: Foundations, algorithms, ...
This paper offers a rigorous, mathematical perspective.
Focus on two key passages: In Section 3.1, read the paragraph that begins "The goal of supervised ML". Note the explicit statement that model parameters (\hat{\theta}) are an output of the learner, while hyperparameters (\lambda) are an input. In Section 4.1, read the first paragraph, which defines the HPO problem. It describes the hyperparameter search space and gives the classic example of SVM kernel HPs being conditional on the choice of kernel type.
The Interplay: Model Selection
The ultimate goal is not just to find any model, but to find the best one. This process, called model selection, involves making choices at all three levels we've discussed:
- Choosing the Hypothesis Space: Do we use a linear model, a polynomial model, a decision tree?
- Tuning the Hyperparameters: If we choose a polynomial model, what should its degree be? If we use regularization, what should be?
- Learning the Model Parameters: For a given choice of hypothesis space and hyperparameters, the algorithm learns the optimal internal parameters from the training data.
Dr. Andrew Ng's lecture on this topic masterfully connects these theoretical ideas to the practical challenge of balancing model complexity to avoid underfitting and overfitting.
Lecture 8 - Data Splits, Models & Cross-Validation | Stanford CS229: Machine Learning (Autumn 2018)
This lecture demonstrates how hypothesis spaces, parameters, and hyperparameters interact in the practical task of model selection.
Please watch these three key segments: Bias and Variance: Here, choosing the degree of a polynomial (linear, quadratic, high-order) is equivalent to choosing between different hypothesis spaces of varying complexity. This illustrates the trade-off between underfitting (high bias) and overfitting (high variance). Regularization: Dr. Ng introduces regularization and its hyperparameter \lambda. This is a perfect example of a hyperparameter that controls the complexity within a given hypothesis space, allowing you to smoothly interpolate between simple and complex models. Model Selection Procedure: This part brings everything together. It explains the standard practice of using a development (or validation) set to choose the best model. You train models with different hyperparameters (e.g., polynomial degree d or regularization \lambda) on the training set and evaluate them on the development set to see which one generalizes best. This is the core mechanism of model selection.
The process described by Dr. Ng is fundamental. The development set is used to guide your choices of hyperparameters and hypothesis spaces. The final, held-out test set is used only once at the very end to get an unbiased estimate of the chosen model's performance on truly unseen data.
Conclusion
In this lesson, we have moved from a high-level view of ML paradigms to the specific building blocks of a supervised learning model. You should now have a clear, formal understanding of the hierarchy of choices involved in building and selecting a model.
Here are the key takeaways:
- The Hypothesis Space (H) is the vast set of all possible functions a learning algorithm is allowed to consider, defined by the choice of model family (e.g., linear models, neural networks).
- Model Parameters () are the coefficients or weights internal to a model. They are learned directly from the training data and define a single, specific hypothesis from the hypothesis space.
- Hyperparameters () are the configuration settings external to the model. They are set manually before training and control the behavior of the learning algorithm itself.
- Model Selection is the process of navigating these choices, typically by using a validation set to tune hyperparameters and select a model that balances bias and variance to achieve good generalization performance.
Now that we have established this crucial vocabulary, we are ready to perform our first rigorous derivation. In the next lesson, we will focus on one of the simplest yet most important hypothesis spaces—linear models—and derive the closed-form solution for its parameters using the method of ordinary least squares.