<p>You can learn more in the publication by <a href="https://arxiv.org/abs/1301.3781" rel="nofollow noreferrer">Tomas Mikolov</a> where he introduces vector embedding called Word2Vec.</p>

<p>Idea behind embedding is to compress sparse vector into a low dimensional dense vector. Lets consider a dictionary of 100k words. Each word can be represented as a vector of size 100000 with all 0s and a single 1 depending on word position/index. Representing a word directly by it's index is not effective (consider ordering or mathematical operations on idexes). But large sparse vectors are not very suitable to work with in context of NN. Embeddings try to encapsulate words in a lower dimensional continuous space, say k=100, where similar words would have lower distance between each other. Mikolov used to define Similarity by how often words appear near each other.  Mikolov trained/tuned embedding matrix E in such a way that E(i)*E(j) would roughly represent the probability of words <em>i and j</em> appearing near by. Later publications showed, that you can achieve similar results by randomly initializing embedding layer in multy-layer network and, after training, embeddings would represent some sort of <em>similarity</em>.</p>

<p>Roughly speaking: NN randomly projects every index to some point in a low-dimensional space. During training with backpropagation this projections are organized in a sort of loose structure, helpful to the task at hand. </p>

<pre><code>Index   Sparse N=6  -&gt;  Embedding K=3
----------------------------------------
0      [1 0 0 0 0 0]  [0.425 0.233 0.556]
1      [0 1 0 0 0 0]  [0.046 0.975 0.058]
2      [0 0 1 0 0 0]  [0.306 0.424 0.651]
3      [0 0 0 1 0 0]  [0.293 0.12  0.546]
4      [0 0 0 0 1 0]  [0.236 0.657 0.046]
5      [0 0 0 0 0 1]  [0.907 0.321 0.882]
</code></pre>
Cant comprehend the meaning of keras.layers.Embedding()
<p>In this <a href="https://keras.io/layers/embeddings/" rel="nofollow noreferrer">documentation</a> it says that it "Turns positive integers (indexes) into dense vectors of fixed size. eg. [[4], [20]] -> [[0.25, 0.1], [0.6, -0.2]]"</p>

<p>Could anyone please make it clearer? </p>

<p>How does the function convert integers into dense vectors? </p>