Correlation & Association

Correlation Heatmap: Visualizing Variable Relationships on Lattice

A correlation heatmap acts as a bird's-eye view of your dataset. It transforms a complex table of numbers into a color-coded map, making it easy to spot which variables move together and which remain independent. Use this tool when you want to explore the relationships between many columns at once.

Seeing the Big Picture

Analyzing data column-by-column is slow and often misses the interconnected nature of your variables. A correlation heatmap simplifies this by calculating the relationship between every pair of columns in your dataset simultaneously.

By mapping these results into a matrix, you can immediately identify which factors act in sync. Whether you are checking if your marketing spend correlates with conversion rates or if physical process inputs affect product quality, this visualization provides an instant summary of your data structure.

Choosing the Right Calculation Method

Lattice allows you to select the math behind your heatmap to match your data type. Pearson is the standard choice for continuous, normally distributed variables. If your data includes outliers or follows a non-linear but consistent trend, Spearman or Kendall methods provide a more accurate reflection of these relationships.

Selecting the right method ensures that your heatmap remains faithful to your specific data distribution, preventing misleading patterns caused by extreme values.

Navigating Groups and Subsets

Complex data often behaves differently across various segments, such as different regions, time periods, or customer cohorts. The heatmap tool allows you to group your data, generating separate views for each segment.

This helps you detect discrepancies—such as a positive relationship in one group that flips to negative in another—ensuring you don't overlook important variations hidden within an aggregated total.

A Note on Interpretation

While a heatmap is excellent for spotting associations, it is important to remember that correlation does not mean causation. These results show that variables move together, but they do not prove that one variable causes changes in another.

Use this tool as a diagnostic first step to identify which variables warrant a closer look or further testing. Once you find a strong correlation, you can move on to more targeted statistical methods to explore those specific relationships in greater detail.

1 · Intent → method

An LLM picks plot_corr_heatmap from a fixed catalog.

2 · Method → numbers

Deterministic Python engine runs the math. Same input → same output.

3 · Numbers → plain language

A second LLM translates the result into your domain’s vocabulary.

  • What do the colors in the correlation heatmap mean?

    The colors represent the direction and strength of the relationship. Blue typically indicates a positive correlation (both variables increase together), while red indicates a negative correlation (as one increases, the other decreases). A neutral or white color suggests little to no linear relationship between those two variables.

  • What is the meaning of the star (*) symbols on the heatmap?

    The stars highlight statistical significance based on your chosen alpha level. They indicate that the relationship between those two variables is unlikely to have occurred by random chance, giving you more confidence that the observed pattern reflects a genuine trend in your data.

Tool input schema

Schema for plot_corr_heatmap not exported yet (run pnpm export:registry).