Answers.Body: <p><em>Latent</em> is a synonym for <em>hidden</em>. </p>
  
  <p>Why is it called a hidden (or latent) variable? For example, suppose that you observe the behaviour of a person or animal. You can only observe the behaviour. You cannot observe the internal state (e.g. the mood) of this person or animal. The mood is a hidden variable because it cannot be observed directly (but only indirectly through its consequences).</p>
  
  <p>A good example of statistical model that is highly based on the notion of latent variables is the <a href="https://en.wikipedia.org/wiki/Hidden_Markov_model" rel="nofollow noreferrer">hidden Markov model</a> (HMM). If you understand the HMM, you will understand the concept of a hidden variable.</p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2019-05-24T11:29:21.507Z
Answers.LastActivityDate: 2019-05-24T20:50:20.150Z
Answers.LastEditDate: 2019-05-24T20:50:20.150Z
Answers.UserDisplayName: nbro
Body: <p>I just learned about GAN and I'm a little bit confused about the naming of Latent Vector.</p>
  
  <ul>
  <li><p>First, In my understanding, a definition of a latent variable is a random variable that can't be measured directly (we needs some calculation from other variables to get its value). For example, knowledge is a latent variable. Is it correct?</p></li>
  <li><p>And then, in GAN, a latent vector <span class="math-container">$z$</span> is a random variable which is an input of the generator network. I read in some tutorials, it's generated using only a simple random function:</p>
  
  <pre><code>z = np.random.uniform(-1, 1, size=(batch_size, z_size))
  </code></pre></li>
  </ul>
  
  <p>then how are the two things related? why don't we use the term "a vector with random values between -1 and 1" when referring <span class="math-container">$z$</span> (generator's input) in GAN?</p>
  
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2019-05-24T20:58:33.813Z
Comments.Text: I will answer here your specific question (because you are asking too many questions in one single post and because I don't want to clutter my answer below). `z = np.random.uniform(-1, 1, size=(batch_size, z_size))` is a sampling operation. You're sampling $z$ from a uniform distribution. In the context e.g. of VAEs, a latent vector is sampled from some distribution. This is a "latent" distribution because this distribution outputs a compact (and hidden) representation of the inputs (e.g. images). This latent distribution is trained to learn such compact representation.
Comments.UserDisplayName: nbro
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2019-05-24T21:05:15.507Z
Comments.Text: I am actually not very well familiar with GANs, but the concrete sampled latent vector $z$ is not a random variable. Mathematically, a hidden variable can be a random variable. The concept of a random variable is more related to the concept of a distribution than to the concept of a vector. Each random variable has an associated distribution. A vector is a sample from a distribution (defined over vectors).
Comments.UserDisplayName: nbro
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2019-05-25T15:59:07.533Z
Comments.Text: @nbro "a hidden variable can be a random variable", based on your answer, is that means "a latent variable can be a random variable"?
Comments.UserDisplayName: malioboro
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2019-05-25T16:00:19.113Z
Comments.Text: @nbro so, do you think, can I call $z$ as a vector with random value instead of latent vector?
Comments.UserDisplayName: malioboro
Tags: <terminology><generative-adversarial-networks>
Title: Why is it called Latent Vector?
UserDisplayName: malioboro
ThreadText: # Why is it called Latent Vector?
  
  (Asked by: username_0 on 2019-05-24)
  
  I just learned about GAN and I'm a little bit confused about the naming of Latent Vector.
  
  First, In my understanding, a definition of a latent variable is a random variable that can't be measured directly (we needs some calculation from other variables to get its value). For example, knowledge is a latent variable. Is it correct?
  And then, in GAN, a latent vector $z$ is a random variable which is an input of the generator network. I read in some tutorials, it's generated using only a simple random function:
  z = np.random.uniform(-1, 1, size=(batch_size, z_size))
  
  
  then how are the two things related? why don't we use the term "a vector with random values between -1 and 1" when referring $z$ (generator's input) in GAN?
  
  **Tags:** terminology, generative-adversarial-networks
  > **Comments:**
  > **username_1**: I will answer here your specific question (because you are asking too many questions in one single post and because I don't want to clutter my answer below). `z = np.random.uniform(-1, 1, size=(batch_size, z_size))` is a sampling operation. You're sampling $z$ from a uniform distribution. In the context e.g. of VAEs, a latent vector is sampled from some distribution. This is a "latent" distribution because this distribution outputs a compact (and hidden) representation of the inputs (e.g. images). This latent distribution is trained to learn such compact representation.  
  > **username_1**: I am actually not very well familiar with GANs, but the concrete sampled latent vector $z$ is not a random variable. Mathematically, a hidden variable can be a random variable. The concept of a random variable is more related to the concept of a distribution than to the concept of a vector. Each random variable has an associated distribution. A vector is a sample from a distribution (defined over vectors).  
  > **username_0**: @nbro "a hidden variable can be a random variable", based on your answer, is that means "a latent variable can be a random variable"?  
  > **username_0**: @nbro so, do you think, can I call $z$ as a vector with random value instead of latent vector?  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_1 on 2019-05-24. Score: 5
  
  *Latent* is a synonym for *hidden*.
  
  Why is it called a hidden (or latent) variable? For example, suppose that you observe the behaviour of a person or animal. You can only observe the behaviour. You cannot observe the internal state (e.g. the mood) of this person or animal. The mood is a hidden variable because it cannot be observed directly (but only indirectly through its consequences).
  
  A good example of statistical model that is highly based on the notion of latent variables is the [hidden Markov model](https://en.wikipedia.org/wiki/Hidden_Markov_model) (HMM). If you understand the HMM, you will understand the concept of a hidden variable.
  
  
  ---
  
  