PCA Projection: Maximum variance with minimum reconstruction error

PCA seeks the most dynamic orthodoxy of data change.

• Step by stepCollate in 2 self-measured2 First-hand sources
Start Body
Learning objectives and first steps2 objectives 2 first fixes

Try to do it after reading

  • Compression and reconstruction of master directions
  • Retention and projection value of the difference

Suggested first

  • Inner vectors & Parameters
  • Classified loss and gradient

We'll get it all in the center and then we'll find a way

PCA seeks the most dynamic orthodoxy of data change. For centralized data, the retention of certain main directions can be interpreted as either maximizing the projector ' s variance or finding the best lowlinear reconstruction under the O.C. square error. The best is to focus on this goal of reconstruction and not on any predictive task.

A 2D sample of [−2,0], [0,0], [2,0] with an average value of 0, all changes in the first axis. Retain a 1-D projection to [−2,0,2], which can be restored precisely along the first axis. If the second axis is kept wrong, all projectors are zero and the reconstruction error is 4+0+4=8.

Add a microaxis 2 noise, and the first main direction usually remains close to the first axis. However, if the labels are just as determined by the positive or negative aspects of the second axis, the direction of the low margin may be very important. PCA does not look at labels and does not automatically know that it is the key to prediction. The compressed dimension should therefore be validated on an independent mission, rather than merely seeking to explain the difference to a certain proportion.

The denominator agreed not to affect the main direction, but to influence the reported values

The sample range may use n−1 as a denominator, while the overall range is n. The first axis of the previous example is 4 or 8/3 respectively, in the same direction, and values are interpreted differently. The reporting of feature values should be consistent with the library definition and should not be misjudged as an algorithmic error.

The scale before the alignment of PCA is also critical. One field is in metameters and the other in tens of thousands, and the unprocessed variant is dominated by the unit. Standardization depends on the semantic nature of the mission and cannot be considered a mandatory step for all PCAs; However, the scale used must be clear.

Training and validation should share the average value and projection matrix of the training set. The distribution of the PCA test is first drawn on the full amount of data and then slitted. The service end also keeps the feature column order, otherwise the same projection matrix times error can still produce a legal shape.

This section is based on the current scikit-learn PCA Publicly defined, the two-dimensional value is synthetic. The main direction is not unique in terms of both positive and negative numbers, and the symbol equivalence should be taken into account when comparing the two attainments, and not just the same element by element.

The main vector of [10] becomes [−10], and will the reconstruction capacity of PCA change?

No change. Projection coordinates are also reversed and the shadow space is the same.

Could it be important for labels to explain the low range of directions?

Yes, PCA optimizes no oversight deviations and does not know which direction the labels are determined by.

The projection coefficients can be used for reconstruction, but the lost orthodox direction cannot be restored by low-dimensional coordinates alone. The reconstruction results were not the only possible explanation for the original sample and the information loss should be quantified.

Sources and reconciliations

Definitions, methods and interfaces are available.

  1. scikit-learn — Decomposing signals in components
  2. scikit-learn — PCA

Figures and calculations are reorganized according to this chapter. Mathematical measurements, framework operations and real business effects are described separately in the body of the text.

← Back to the knowledge directory
Ask Max Ask about this site
Ask Max ↗

Opening the assistant…

Paper figure

Photo comments

LEAVE A NOTE

About this photograph

Connecting to the discussion board…

    Comments become public after moderation. You can delete your own comments from this browser.
    No email is required. Clearing cookies prevents this browser from claiming earlier comments.

    MAX WANG / INDEX

    Find something

    Enter a keyword, or explore the directory below.