Glossary term
What are hyperparameters?
What are hyperparameters?
Hyperparameters are the configuration settings used to structure the learning process in machine learning models. They are set prior to training a model and are not learned from the data. Unlike model parameters, which are learned during training, hyperparameters are used to control the behavior of the training algorithm and can significantly impact the performance of the model.
For example, in neural networks, hyperparameters can include the learning rate, the number of layers, the number of units in each layer, and the type of activation function to use. In other machine learning models, such as support vector machines, hyperparameters might include the kernel type and the regularization parameter.
The process of selecting the optimal hyperparameters is known as hyperparameter tuning or optimization. This is a critical step because the right set of hyperparameters can lead to more accurate models, while poorly chosen hyperparameters can result in models that underfit or overfit the data. See hyperparameter tuning for a rundown of the search strategies used to find good hyperparameter values.
What is a hyperparameter vs parameter?
A parameter is a variable that the model learns from the training data. These are internal to the model and are automatically updated during the learning process. For instance, in a linear regression model, the coefficients of the predictors are parameters. Similarly, in a neural network, the weights and biases associated with the nodes are parameters. These parameters are crucial as they define the model's representation of the data and directly influence the predictions made by the model.
On the other hand, a hyperparameter is a configuration variable that is external to the model and whose value cannot be estimated from data. These are set before the learning process begins and control the learning process itself. Examples of hyperparameters include the learning rate in optimization algorithms, the number of hidden layers in a neural network, or the number of clusters in a clustering algorithm. The choice of hyperparameters can significantly impact the performance of the model, and they are often tuned to optimize model performance.
While parameters are learned from the data during the training process, hyperparameters are set by the practitioner before training and guide the learning process. Both are crucial in building effective machine learning models.
Hyperparameters in Machine Learning
The challenge in hyperparameter selection lies in its dependency on both the data and the task, requiring a balance between model complexity and generalization. In practice, hyperparameters appear across a wide range of model types:
- In deep learning and neural networks, they adjust the network's structure and learning process.
- Support vector machines depend on hyperparameters to balance classification accuracy and model complexity.
- The number of clusters in k-means clustering or the depth of trees in decision trees and random forests determines the granularity of the model's understanding.
- Gradient boosting's performance is tuned through the learning rate and the number of stages.
- In reinforcement learning, hyperparameters like the discount factor shape the agent's learning strategy.
- Natural language processing and computer vision applications rely on hyperparameters to refine models for tasks like word embedding and feature extraction.
More terms
Continue exploring the glossary.
Glossary term
What is a non-deterministic algorithm?
It's time to build
Collaborate with your team on reliable Generative AI features.
Want expert guidance? Book a 1:1 onboarding session from your dashboard.