Feature Interaction Plot Calculator

Explore how two features jointly influence predictions through interactive heatmaps, surfaces, grouped trends, interaction scores, filtering, comparisons, and downloadable analysis summaries for every dataset.

Interaction Results

Results appear here after processing the supplied dataset.

Not calculated
Load example data or paste a dataset, select two features, then calculate the interaction.

1. Data Input

Quoted fields are supported. Large datasets are sampled only for pair ranking, not for the selected interaction.

2. Feature and Prediction Setup

Exact partial dependence and exact SHAP interaction values require a trained model. This page analyzes supplied predictions and computes transparent additive-deviation proxies.

3. Binning, Transformation, and Category Controls

%

4. Filtering

5. Statistics and Comparison

6. Plot Options

7. Save and Export Preferences

Formula Used

The calculator groups observations across two selected features. It calculates a weighted aggregate for each interaction cell. The resulting grid shows their joint prediction behavior.

Cell mean: μᵢⱼ = Σ(wₖyₖ) / Σwₖ Additive expectation: Aᵢⱼ = μᵢ· + μ·ⱼ − μ·· Interaction effect: Iᵢⱼ = μᵢⱼ − Aᵢⱼ Interaction strength: H = √[Σ nᵢⱼIᵢⱼ² / Σ nᵢⱼ(μᵢⱼ − μ··)²]

The H value is bounded near zero and one. Higher values indicate stronger departures from additive behavior. Sparse grids can make estimates unstable.

How to Use

  1. Paste a dataset or load the example data.
  2. Select the primary and interacting feature columns.
  3. Choose the observed target and prediction columns.
  4. Set feature types, bins, filters, and statistics.
  5. Select a plot type and visualization options.
  6. Calculate, inspect warnings, and export the results.

Example Data

The built-in dataset contains numeric and categorical predictors. Its prediction includes a nonlinear age-income interaction. A second model supports direct comparison.

ageincomesegmenttenuretargetprediction
2432000Basic1.242.841.6
3968000Plus4.873.471.9
56104000Premium8.798.1101.3

Interpretation Guide

Near-zero cells indicate behavior explained by separate feature effects. Positive cells exceed the additive expectation. Negative cells fall below that expectation.

A structured color pattern suggests meaningful interaction. Random isolated cells often reflect sparse observations. Confirm findings with domain knowledge and validation.

Limitations and Assumptions

This calculator evaluates supplied values rather than fitting arbitrary models. Its SHAP and partial-dependence modes are transparent approximations. Exact explanations require model-specific libraries.

Correlation can create misleading interaction patterns. Sparse categories increase uncertainty and unstable estimates. Consider sample coverage before making decisions.

Frequently Asked Questions

What is a feature interaction?

A feature interaction occurs when one feature’s effect changes across another feature’s values. The joint effect cannot be explained by adding separate effects.

What does the H score mean?

The score compares interaction variation with total joint variation. Values near zero are mostly additive. Larger values indicate stronger interaction.

Can categorical features be analyzed?

Yes. Categories become plot levels or grouped lines. Rare categories can be merged automatically.

Does this train a machine learning model?

No. It analyzes observed values and supplied predictions. This keeps the calculation transparent and browser compatible.

Can I compare two models?

Yes. Select two prediction columns in comparison mode. The plot can display their interaction difference.

Why are some cells empty?

No observations reached those feature combinations. Empty cells are not interpolated by default. Their absence protects interpretation.

Which binning method should I use?

Quantile bins usually balance sample counts. Equal-width bins preserve numeric spacing. Custom boundaries support domain rules.

How are confidence intervals calculated?

The calculator resamples each cell with replacement. Percentile limits form the requested interval. More iterations improve stability.

Can results be exported?

Yes. Export the processed grid as CSV. Download charts as PNG or SVG, then print to PDF.

Related Calculators

Feature Importance Bar ChartPermutation Importance PlotSHAP Summary PlotSHAP Dependence PlotSHAP Force PlotSHAP Waterfall PlotLIME Feature PlotCoefficient PlotRegularisation Path PlotMutual Information Bar Chart

Important Note: All the Calculators listed in this site are for educational purpose only and we do not guarentee the accuracy of results. Please do consult with other sources as well.