Alterna · learning material

13.4. The figure shows only part of the space

The projection compresses several coordinates in two, the overlapping points on the screen may differ by hidden coordinates.

What this material covers

Content and key concepts

On the previous page, look for the nearest directions.
The projection compresses several coordinates in two, the overlapping points on the screen may differ by hidden coordinates.
Table E stores the coordinate line for each ID. These coordinates are taught. The familiar cosine is now used for the specific task of finding close representations.
Координаты и расчёт геометрического примера приведены в тексте. Для изменения пространственного рисунка включитеJavaScript.
The image is not equal to the original space.
Of the three coordinates, you can show the first two, choose another pair, or build a PCA2D. The PCA first concentrates the lines, then looks for directions of maximum dispersion covariance. The projection hides the remaining coordinate; keeping the position on the flat drawing does not mean keeping all the distances and angles.
X
c
=
X
−
x
ˉ
,
C
=
X
c
T
X
c
/
N
,
Z
=
X
c
V
[
:
,
1
:
2
]
.
X_c=X-\bar x,\quad C=X_c^TX_c/N,\quad Z=X_cV_{[:,1:2]}.
X
c
​
=
X
−
x
ˉ
,
C
=
X
c
T
​
X
c
​
/
N
,
Z
=
X
c
​
V
[
:
,
1
:
2
]
​
.
In the laboratory covariance [3.3], diagonalizes with a small Jacobi-algorithm. You can see eigenvalues, basis and projections. With multiple eiggenaluses, the base may not be the only one. The sign eigenvironment is also arbitrary: the simultaneous reflection of the axis does not change the recovered component.
Counter-example.
The vectors [1.0.0] and [1.0.2] have the same first two coordinates. On the XY graphics they are identical, but cosine in 3Draven1/G5E.447214. Therefore, it is not possible to conclude "this is the same embeddings" only for matching points.
Research.
Switch XY,XZ,PCA. Compare the drawing to the constant complete cosine cosines. Centralization for PCA should not change the original E or the Skip-gram sample. The names of the axis "PC1/PC2" indicate linear combinations, not human concepts.
from math import sqrt
assert [1,0,0][:2]==[1,0,2][:2]
assert abs(1/sqrt(5)-.4472135954999579)<1e-12
The code repeats the operations just taken care of.
Completely checked Python-example Chapter
Available with a separate file; the short piece shown does not replace its implementation.
The projection is losing its measurement.
One word in different neighborhoods. How does this question continue?
Python examples of Chapter 13
Academic base

Textbook contents map