← Parallel Coordinates

Anomaly and Classification

Two applications of one idea: drift away from a bundle, or jump between bundles. Same perceptual mechanism, different baselines.

Multivariate profile detection has two flavors. Process control has one nominal bundle and asks whether a new profile has drifted. Diagnosis has two competing bundles and asks which one a new profile joins. The perceptual task — where does this polyline sit relative to a reference? — is the same; the reference differs.

This explainer walks both cases: industrial chemistry first, then medicine.

Drift: Process Control

A chemical reactor has sensors for inlet/outlet temperature, pressure, flow rates, concentrations, catalyst level, pH. The operator must monitor all of them, detect drift, and identify the root cause.

Each time step is a polyline across all variables. The full history of normal operation forms the nominal bundle; faults are polylines that escape it, and the escape pattern points to the cause.

The Chemical Process Monitor

The faded bundle is 200 historical readings during normal operation. The bold polyline is the current state, draggable on any axis.

Drag the blue dot on any axis to change the current reading. Watch axis labels turn red when the value moves outside the normal bundle.

Figure 1. Chemical process monitor. The faded bundle is 200 normal readings. The bold polyline is the current state, draggable on each axis. Dashed lines mark spec limits (roughly ±3σ of the nominal distribution for each sensor). Axis labels turn red when the current reading exceeds spec.

Normal is a cluster, faults are outliers. Normal operation is a cluster in 8D space, and the bundle makes it visible. Faults are polylines that deviate from the bundle on specific axes; the pattern of deviation encodes the nature of the fault.

Drift Detection

Some processes drift slowly: a catalyst deactivates, a heat exchanger fouls, a sensor's calibration slips. A slow drift in one or two of eight variables is easy to miss in a table. Coloring readings by time makes it visible.

A simulated drift causes outlet_temp to shift upward by 20°C and concentration_B to shift downward by 0.08 mol/L. The time coloring makes the drift visible as a gradient across the bundle on the affected axes, while unaffected axes show blue and red interleaved.

Figure 2. Time-ordered readings colored blue (early) to red (late). Outlet temperature and concentration B drift over time. Toggle to compare with a stable process.

Fault Propagation and Axis Ordering

Reactor variables aren't independent: inlet temperature drives outlet temperature, which affects kinetics, which determines concentrations. Adjacent placement of causally related variables produces smooth bundles; unrelated adjacency produces tangle.

A greedy correlation algorithm starts with the highest |Pearson r| pair and extends from either end with the most-correlated remaining variable. The result places causally related sensors adjacent.

Drag axis labels to reorder manually, or click "Suggest order" to let the correlation algorithm arrange them.

Figure 3. Axis reordering by pairwise correlation. The algorithm places strongly correlated variables adjacent, making the causal chain inlet_temp → outlet_temp → concentration_A → concentration_B visible as smooth bundles. The small r= annotations between axes show the Pearson correlation of the adjacent pair.

Causal chains become visible. When axes are ordered by correlation, transitions between adjacent axes are smooth. In a drift event, you can read the chain: which variable shifted first, which followed, and which was unaffected. This is how operators trace a fault from symptom back to root cause.

Alarm Regions and Brushing

An alarm fires when a variable exceeds its limit. But a single alarm tells you nothing about the system state across other variables. Brushing an axis selects the alarm readings on that axis and immediately shows which other axes are also abnormal for those readings. This is the multi-dimensional view that a threshold alarm on a single variable cannot provide.

Ten alarm readings (red) are constructed to violate limits on one or more axes with realistic fault patterns (e.g., an outlet_temp spike paired with a concentration_B drop), against 200 normal readings in gray.

Click and drag vertically on any axis to brush. Polylines passing through the brushed range are highlighted.

Figure 4. Normal readings (gray) and alarm readings (red). Brush any axis to select a range. Try brushing the extreme region on outlet_temp to see which other variables are simultaneously abnormal.

Classification: Diagnosis

A patient arrives with blood pressure, heart rate, cholesterol, ST depression. Each number alone is ambiguous; the doctor evaluates the whole profile.

The geometry shifts: instead of "is the polyline inside the bundle?" the question is "which of two bundles does it join?" The gap between healthy and diseased bundles is the classification boundary.

Heart Disease Profiles

The data below models 303 patients based on the UCI Heart Disease dataset's distributions. Six clinical measurements are drawn on parallel axes: age, resting blood pressure, serum cholesterol, maximum heart rate achieved during exercise, ST depression induced by exercise (oldpeak), and the number of major coronary vessels visible on fluoroscopy. Each polyline is colored by diagnosis: blue for no heart disease, red for disease present.

No disease Heart disease

Hover over individual polylines to highlight a single patient's profile.

Figure 5. Parallel coordinates plot of 303 heart disease patients. The two diagnostic classes form overlapping but distinguishable bundles. Notice where the bundles separate (max heart rate, oldpeak, vessels) and where they overlap (cholesterol).

The bundles aren't cleanly separated on every axis. Age and cholesterol overlap heavily. Max heart rate, oldpeak, and the major-vessel count separate the classes: healthy patients reach higher heart rates, disease patients have higher oldpeak, and major-vessel count clusters at 0 for healthy and spreads across 1–3 for disease.

Discriminating Dimensions

Not all axes contribute equally to distinguishing the classes. We can quantify each axis's discriminating power using Cohen's d, the difference in class means normalized by the pooled standard deviation:

A Cohen's d near zero means the two classes overlap almost completely on that axis. A large absolute d means the axis separates the classes well. Rules of thumb call 0.2 a small effect, 0.5 medium, 0.8 large. Sorting by separation places the most discriminating dimensions adjacent, concentrating the visual separation.

Figure 6. Parallel coordinates with a bar chart of Cohen's d separation scores. The axes with the highest bars are the most diagnostically useful. Sorting by separation groups the discriminating axes together, making the class boundary more visible.

When discriminating axes are adjacent, between-class crossing patterns become more pronounced. Correlation ordering finds causal chains; Cohen's-d ordering finds discriminative chains.

Classifying a New Patient

Given the two class bundles, a new patient can be classified by asking: which bundle is closer? A nearest-centroid classifier computes the Euclidean distance (on standardized axes, each feature divided by its pooled standard deviation) to each class centroid and assigns the patient to the closer group.

Drag the dots on the axes or use the sliders to adjust the patient's measurements.

Figure 7. A new patient's polyline (bold black) against the faded class bundles. Adjust the sliders or drag the dots directly on the axes to move the polyline and watch the nearest-centroid prediction update. The decision boundary is the hyperplane equidistant from the two centroids in standardized 6D space.

The decision surface is not a single line; it's the implicit boundary in the gap between bundles. Moving a profile across the gap flips the prediction. The flip is geometric: the polyline crossed a hyperplane whose trace in PC is exactly where the bundles meet.

Brushing for Subgroups

Diagnosis is not uniform across all patients. Age modifies the clinical picture: the same cholesterol level carries different risk at 35 than at 70. Brushing the age axis slices the data into age-based subgroups and reveals how the diagnostic profiles shift.

No disease Heart disease (grayed out = outside brush)

Drag to create a brush on the Age axis. Drag the brush up and down to select different age ranges.

Figure 8. Brushing on the age axis selects a subgroup. Young patients (low age range) show different class separation patterns than old patients. The discriminating axes shift as the population changes.

Young patients with heart disease have more extreme values on the discriminating axes, because disease at a young age requires stronger risk factors. Older patients show more between-class overlap as age itself becomes a risk factor.

One mechanism, two baselines

Both halves ask the same question — where does the new polyline sit relative to a reference? — with different reference sets.

Process control: a single nominal bundle, one-sided inside/outside test. Diagnosis: two competing bundles, two-sided proximity test. Nearest-centroid rules are the simplest realization; LDA, QDA, and SVMs replace the centroid with richer bundle summaries but play the same geometric game.

Multi-class classification is diagnosis with more bundles; anomaly detection with multiple fault modes is diagnosis with "normal" as one bundle. The same plot carries all of these.

The next explainer, Collision Courses, moves from static bundles to trajectories that evolve in time and asks a related geometric question: when do two time-varying profiles cross?