Answers.Body: <p>In older machine learning literature the given definition of hyperparameters was explicitly the same used in Bayesian statistics, i.e.</p>
  <blockquote>
  <p><a href="https://en.wikipedia.org/wiki/Hyperparameter" rel="nofollow noreferrer">a hyperparameter is a parameter of a prior distribution</a></p>
  </blockquote>
  <p>For example, in Christopher M. Bishop's &quot;Pattern Recognition and Machine Learning&quot; (Springer, 2006), hyperparameters are introduced in the following paragraph (page 30)</p>
  <blockquote>
  <p>Now let us take a step towards a more Bayesian approach and introduce a prior distribution over the polynomial coefficients <span class="math-container">$\mathbf{w}$</span>. For simplicity, let us consider a Gaussian distribution of the form
  <span class="math-container">$$
  p(\mathbf{w} \mid \alpha)=\mathcal{N}\left(\mathbf{w} \mid \mathbf{0}, \alpha^{-1} \mathbf{I}\right)=\left(\frac{\alpha}{2 \pi}\right)^{(M+1) / 2} \exp \left\{-\frac{\alpha}{2} \mathbf{w}^{\mathrm{T}} \mathbf{w}\right\}
  $$</span>
  where <span class="math-container">$\alpha$</span> is the precision of the distribution, and <span class="math-container">$M+1$</span> is the total number of elements in the vector <span class="math-container">$\mathbf{w}$</span> for an <span class="math-container">$M^{\text {th }}$</span> order polynomial. Variables such as <span class="math-container">$\alpha$</span>, which control the distribution of model parameters, are called <strong>hyperparameters</strong>.</p>
  </blockquote>
  <p>In modern machine learning literature though, the definitions became more operational. For example, in Ian Goodfellow, Yoshua Bengio, Aaron Courville - Deep Learning (2016), we can read</p>
  <blockquote>
  <p>Most machine learning algorithms have hyperparameters, settings that we can use to control the algorithm's behavior. The values of hyperparameters are not adapted by the learning algorithm itself (though we can design a nested learning procedure in which one learning algorithm learns the best hyperparameters for another learning algorithm).</p>
  </blockquote>
  <p>So, there is room for interpretation, even though I personally find more technical and precise the old reference to Bayesian statistics. It is clear from that definition that every variable not belonging to the parameters used in the prediction phase but only during training are indeed hyperparameters. Moreover, it is clear that the choice of hyperparameters affects the distribution of learned parameters once the model training reaches convergence.</p>
  <p>To elaborate a bit more on the modern definitions, what I don't like about the example taken from <em>Deep Learning</em> is the lack of further explanation about the meaning of &quot;model behavior&quot;. Does it refer to weight updating during training? Final metrics score? Both and more? In other words, what are hyperparameters supposed to affect? Of course, these loose definitions do not stop machine learning practitioners from using hyperparameters in the right place, but no surprise about doubts emerging like this question.</p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2021-10-29T14:51:42.547Z
Answers.Text: I would also like to note that the 2 definitions that you quote are not necessarily inconsistent with each other.
Answers.UserDisplayName: nbro
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2021-10-29T12:24:11.503Z
Answers.LastActivityDate: 2021-10-29T14:48:38.237Z
Answers.LastEditDate: 2021-10-29T14:48:38.237Z
Answers.UserDisplayName: Edoardo Guerriero
Answers.Body: <blockquote>
  <p>Is it okay to call <strong>anything</strong> that needs to be learned outside the training algorithm a hyperparameter?</p>
  </blockquote>
  <p>I think so, yes.</p>
  <p>Personally, I would reserve the term to discuss values that I could choose freely in any given experiment, but that were not learned directly from the training data by the model class I was using. Or perhaps with a tighter restriction for practical purposes, things I would be willing to investigate and change in order to achieve the goal of getting good metrics from the learning agent - it doesn't matter from a practical perspective what I label a value for something that <em>could</em> be changed, if I am not considering changing it.</p>
  <p>Choices that I am not interested in making for a given experiment might be hyperparameters to someone else who is performing a different kind of search.</p>
  <p>Discrete, top-level choices such as whether to use linear regression versus XGBoost versus a deep neural network might <em>technically</em> be considered hyperparameters, and a sophisticated search algorithm may even automatically test across them. However, I rarely see this kind of choice discussed using the term hyperparameter.</p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2021-10-29T11:57:31.360Z
Answers.LastActivityDate: 2021-10-29T15:10:58.197Z
Answers.LastEditDate: 2021-10-29T15:10:58.197Z
Answers.UserDisplayName: Neil Slater
Body: <p>As per my knowledge, any entity that is learnable by a training algorithm can be called a parameter. Weights of a neural network are called parameters because of this reason only.</p>
  <p>But I have doubts about the qualification of hyperparameter.</p>
  <p>Hyperparameter according to my knowledge is an entity that needs to be learned outside of the training algorithm. But, a lot of entities can come into the picture if I want to follow this definition.</p>
  <p>For example, the selection of the type of neural network, number of layers, number of neurons in each layer, presence of batch normalization layer, type of activation function, number of parameters, type of parameters (integer, float, etc.), number of epochs, batch size, type of optimizer, learning rate, etc., and I can able to list a lot of entities like this.</p>
  <p>Is it okay to call <strong>anything</strong> that needs to be learned outside the training algorithm a hyperparameter?</p>
  
Tags: <machine-learning><definitions><hyper-parameters>
Title: When can I call an entity a hyperparameter?
UserDisplayName: hanugm
ThreadText: # When can I call an entity a hyperparameter?
  
  (Asked by: username_0 on 2021-10-29)
  
  As per my knowledge, any entity that is learnable by a training algorithm can be called a parameter. Weights of a neural network are called parameters because of this reason only.
  
  But I have doubts about the qualification of hyperparameter.
  
  Hyperparameter according to my knowledge is an entity that needs to be learned outside of the training algorithm. But, a lot of entities can come into the picture if I want to follow this definition.
  
  For example, the selection of the type of neural network, number of layers, number of neurons in each layer, presence of batch normalization layer, type of activation function, number of parameters, type of parameters (integer, float, etc.), number of epochs, batch size, type of optimizer, learning rate, etc., and I can able to list a lot of entities like this.
  
  Is it okay to call **anything** that needs to be learned outside the training algorithm a hyperparameter?
  
  **Tags:** machine-learning, definitions, hyper-parameters
  
  
  ---
  
  ## 2 answers
  
  ### Answer by username_1 on 2021-10-29. Score: 4
  
  In older machine learning literature the given definition of hyperparameters was explicitly the same used in Bayesian statistics, i.e.
  
  > [a hyperparameter is a parameter of a prior distribution](https://en.wikipedia.org/wiki/Hyperparameter)
  
  For example, in Christopher M. Bishop's "Pattern Recognition and Machine Learning" (Springer, 2006), hyperparameters are introduced in the following paragraph (page 30)
  
  > Now let us take a step towards a more Bayesian approach and introduce a prior distribution over the polynomial coefficients $\mathbf{w}$. For simplicity, let us consider a Gaussian distribution of the form
  > $$
  > p(\mathbf{w} \mid \alpha)=\mathcal{N}\left(\mathbf{w} \mid \mathbf{0}, \alpha^{-1} \mathbf{I}\right)=\left(\frac{\alpha}{2 \pi}\right)^{(M+1) / 2} \exp \left\{-\frac{\alpha}{2} \mathbf{w}^{\mathrm{T}} \mathbf{w}\right\}
  > $$
  > where $\alpha$ is the precision of the distribution, and $M+1$ is the total number of elements in the vector $\mathbf{w}$ for an $M^{\text {th }}$ order polynomial. Variables such as $\alpha$, which control the distribution of model parameters, are called **hyperparameters**.
  
  In modern machine learning literature though, the definitions became more operational. For example, in Ian Goodfellow, Yoshua Bengio, Aaron Courville - Deep Learning (2016), we can read
  
  > Most machine learning algorithms have hyperparameters, settings that we can use to control the algorithm's behavior. The values of hyperparameters are not adapted by the learning algorithm itself (though we can design a nested learning procedure in which one learning algorithm learns the best hyperparameters for another learning algorithm).
  
  So, there is room for interpretation, even though I personally find more technical and precise the old reference to Bayesian statistics. It is clear from that definition that every variable not belonging to the parameters used in the prediction phase but only during training are indeed hyperparameters. Moreover, it is clear that the choice of hyperparameters affects the distribution of learned parameters once the model training reaches convergence.
  
  To elaborate a bit more on the modern definitions, what I don't like about the example taken from *Deep Learning* is the lack of further explanation about the meaning of "model behavior". Does it refer to weight updating during training? Final metrics score? Both and more? In other words, what are hyperparameters supposed to affect? Of course, these loose definitions do not stop machine learning practitioners from using hyperparameters in the right place, but no surprise about doubts emerging like this question.
  
  > **Comments:**
  > **username_2**: I would also like to note that the 2 definitions that you quote are not necessarily inconsistent with each other.  
  
  ---
  
  ### Answer by username_3 on 2021-10-29. Score: 2
  
  > Is it okay to call **anything** that needs to be learned outside the training algorithm a hyperparameter?
  
  I think so, yes.
  
  Personally, I would reserve the term to discuss values that I could choose freely in any given experiment, but that were not learned directly from the training data by the model class I was using. Or perhaps with a tighter restriction for practical purposes, things I would be willing to investigate and change in order to achieve the goal of getting good metrics from the learning agent - it doesn't matter from a practical perspective what I label a value for something that *could* be changed, if I am not considering changing it.
  
  Choices that I am not interested in making for a given experiment might be hyperparameters to someone else who is performing a different kind of search.
  
  Discrete, top-level choices such as whether to use linear regression versus XGBoost versus a deep neural network might *technically* be considered hyperparameters, and a sophisticated search algorithm may even automatically test across them. However, I rarely see this kind of choice discussed using the term hyperparameter.
  
  
  ---
  
  