Alterna · learning material
06.6 Which data directions are important for the drawing
Select the direction where the central points are most scattered, which is useful for compression, but not required to be a meaningful sign.
What this material covers
- First center, then direction
Content and key concepts
On the previous page, groups without ready correct answers.
Select the direction where the central points are most scattered, which is useful for compression, but not required to be a meaningful sign.
The selection of straight lines and the division of points makes it possible to see the learning process on simple data. Verification answers do not participate in the corrections.
Координаты и расчёт геометрического примера приведены в тексте. Для изменения пространственного рисунка включитеJavaScript.
First center, then direction
For X[N,d], subtract the average of each topic and receive Xc. In the laboratory covariance C=XcTXc/N. The N-1 division gives another scale eigenvalues, but the same eiggenectors at N>1. The first PCA channel v1 maximizes vTCv when , ,v ,2=1, and is the eigenvironmentr of the largest eiganalue.
z
i
=
v
1
T
(
x
i
−
x
ˉ
)
,
x
^
i
=
x
ˉ
+
z
i
v
1
.
z_i=v_1^T(x_i-\bar x),\qquad
\hat x_i=\bar x+z_iv_1.
z
i
=
v
1
T
(
x
i
−
x
ˉ
)
,
x
^
i
=
x
ˉ
+
z
i
v
1
.
For points (t,.5t),t = 2, - 1.0,1.2 average 0.C=[2.1],[1.5]], eigenvalues 2.5 and0. The main axis is proportional[2,1], the normalized vector[2.1/G5], all points shall be re-established in a single unmistakable coordinate: the dataset lies on a straight line.
Experiment.
Add all y equaloffset. Centralization should remove it from covariance, and the restored points should save the new center. Add a transversal disturbance: there will be a second eigenvalue and a non-zero error Frank1. The PC sign may turn without changing the projection; with equal eiggenalues, the direction is not unique.
Boundary.
The PCA is looking for dispersion, not for target or "truth." A big noisy sign can become the first component. Fit mean/bases on test creates leakage. The next step is to learn to build non-linear signs inside the model:
Artificial neuron
.
points=[[t,.5*t] for t in [-2,-1,0,1,2]]
C=[[sum(row[i]*row[j] for row in points)/5 for j in range(2)] for i in range(2)]
assert C==[[2,1],[1,.5]]
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.
PCA does not use Target and does not promise semantic importance.
What does one element from which a more complex model is built look like?
Python examples of Chapter 06
Academic base