← Machine Learning for EveryoneToolsInVisionLearning Center
Unsupervised Patterns · Lesson 60

PCA for Compact Representations

Dozens of correlated route indicators make the dashboard crowded.

Read the full lesson and open its transcript below. A narrated video will be added after production.

Lesson overview

What you will learn

Dozens of correlated route indicators make the dashboard crowded.

  1. A practical question
  2. The useful idea
  3. Work through the example
  4. Limits and next step
01

A practical question

The delivery table contains many related measures: route distance, estimated drive time, and number of stops. A plot with all of them is hard to read. Principal component analysis, or P C A, finds new directions that capture large variation in the training features.

02

The useful idea

Center the training data and apply any chosen scaling before fitting the directions. Then use those same fitted steps on validation or future trips. A direction with large variance may mostly reflect long versus short routes; it need not predict lateness.

03

Work through the example

Plot trips on two components and color them by route category for interpretation. Inspect which original features dominate each direction. If late trips overlap with on-time trips, don't claim that the plot has found a delay detector. Principal component analysis summarizes directions of variation in standardized inputs. Fit it only on training deliveries, then apply the same transformation to later records. A two-dimensional plot may separate some routes while hiding a rare condition that matters for delay. Check how much information is retained and whether a downstream decision improves. A visually tidy map is a representation of variation, not proof that the components explain the cause of lateness. Use this case to test your understanding: Project standardized training features onto two components, then apply the same transform to new trips. Here is the limitation to watch for: High variance does not always mean high predictive value for lateness. Find one component that mainly reflects route distance and another mixing several indicators. A simple plot can help explain variation, but it may hide a rare closure that matters more to a warning. Check the downstream model on later deliveries before discarding the original features.

04

Limits and next step

Next, we'll return to readable if-then rules that operations staff can inspect and challenge.

Worked example

Project standardized training features onto two components, then apply the same transform to new trips.

Knowledge check

Quick check: test your understanding

Try it yourself: Consider this case: Project standardized training features onto two components, then apply the same transform to new trips. Explain how you would check the result. In your answer, address this limitation: High variance does not always mean high predictive value for lateness.

Check the reasoning

PCA finds orthogonal directions of maximum variance after suitable preprocessing. High variance does not always mean high predictive value for lateness.

What is the main idea behind pca for compact representations?

PCA finds orthogonal directions of maximum variance after suitable preprocessing.

How is it used in the example?

Project standardized training features onto two components, then apply the same transform to new trips.

What limitation should be checked?

High variance does not always mean high predictive value for lateness.

Further reading

Machine Learning — Tom M. Mitchell.

Original ToolsInVision teaching examples. Editorial approach · Suggest a correction

Accessible referenceLesson 60 transcript292 words · Narration ready for the upcoming videoOpen transcript

The delivery table contains many related measures: route distance, estimated drive time, and number of stops. A plot with all of them is hard to read. Principal component analysis, or P C A, finds new directions that capture large variation in the training features.

Center the training data and apply any chosen scaling before fitting the directions. Then use those same fitted steps on validation or future trips. A direction with large variance may mostly reflect long versus short routes; it need not predict lateness.

Plot trips on two components and color them by route category for interpretation. Inspect which original features dominate each direction. If late trips overlap with on-time trips, don't claim that the plot has found a delay detector. Principal component analysis summarizes directions of variation in standardized inputs. Fit it only on training deliveries, then apply the same transformation to later records. A two-dimensional plot may separate some routes while hiding a rare condition that matters for delay. Check how much information is retained and whether a downstream decision improves. A visually tidy map is a representation of variation, not proof that the components explain the cause of lateness. Use this case to test your understanding: Project standardized training features onto two components, then apply the same transform to new trips. Here is the limitation to watch for: High variance does not always mean high predictive value for lateness. Find one component that mainly reflects route distance and another mixing several indicators. A simple plot can help explain variation, but it may hide a rare closure that matters more to a warning. Check the downstream model on later deliveries before discarding the original features.

Next, we'll return to readable if-then rules that operations staff can inspect and challenge.