← 아카데미로 돌아가기
In a bicycle workshop, a learner holds two plots to the window while a tutor compares a single curve with two individual traces.
AI 지식핵심2026년 11월 13일· 3 분

Partial Dependence Plots

Partial dependence plots average model predictions when one feature is set to chosen values across reference records, revealing average trends but not individual behaviour or causal effects.

partial dependencemodel interpretationconditional expectation

출처

전체 수업 요약

A partial dependence plot answers a narrow but useful question. If we set one feature to a chosen value for every record in a reference dataset, keep each record's other features unchanged, and average the model's predictions, what value do we get? Repeating this across a grid of values for that feature produces a curve. The curve shows how the model's average prediction shifts as the feature moves, holding the rest of each record in its original state.

Consider a model predicting daily bicycle rentals from temperature, humidity, wind and day of week. To build a partial dependence curve for temperature, we pick a value such as 15 degrees Celsius. For each of 2,000 reference days, we replace its temperature with 15 while leaving humidity, wind and weekday as recorded, then ask the model for a prediction. Averaging those 2,000 predictions gives one point on the curve. Repeating at 5, 10, 20 and 25 degrees traces the full plot. If the average prediction rises from 180 rentals at 5 degrees to 420 at 20 degrees, we can say the model associates warmer temperatures with more rentals on average across these records. The grid of evaluation values usually comes directly from the reference data, so the curve is anchored to temperatures the model has actually seen.

This differs from tracing a single profile. An individual conditional expectation curve follows one record as the feature changes, so a particular wet Monday may show falling rentals as temperature rises. Plotting many such individual curves alongside the average reveals where they agree and where they diverge. Opposing individual slopes can cancel, leaving a flat average that hides real structure. A teacher might show one student's curve climbing steeply while another falls, and the averaged line sitting nearly level between them.

The averaging calculation works even when inputs are correlated, but dependence can make the result difficult to interpret. When temperature and humidity are correlated, replacing temperature while keeping humidity fixed can create combinations that never occur in real weather, such as 30 degrees with 95 percent humidity. Predictions at those points may be implausible, and the curve can bend for reasons that reflect artificial records rather than genuine patterns. The plot is also descriptive only. It reports what the model does with these inputs and says nothing about what would happen if we changed the weather itself.

Give pairs of students a small table of six fictional days with temperature and a weekday indicator. Their rule can, for example, add twice as many rentals per degree on weekends as on weekdays. Ask each pair to compute the partial dependence value at two settings, then draw one individual profile. In discussion, ask which number answers which question and where the averaging could mislead. Record their explanations on the board so the class can compare interpretations and notice where their own assumptions crept in.

Partial dependence is best treated as one lens among several. It rewards careful reading of what was averaged, which records were used and whether the feature combinations are realistic. Students who can explain the averaging step, name the independence assumption and distinguish an average trend from a single record's path hold a durable habit of mind for interpreting any model summary they meet.