corrplot
result = corr_heatmap(t)
Input: t · Output: result
What it is
Computes the pairwise Pearson correlation of Table t's numeric columns. corr_heatmap/corrplot render it directly as a heatmap and return nothing; corrmat(t) instead returns a tagged Model (.matrix, an n-by-n Mat of correlation values, plus .labels, a List of the n column names) for when you want the numbers rather than a picture — calling .plot() on that Model also renders the labeled heatmap.
Overloads
One call shape — this function is not overloaded.
| Code | Input | Output | Description |
result = corr_heatmap(t) | t Table, Model, matrix, Mat, List, or numbernot documented yet | result Model, matrix, Mat, or List | Returns a tagged Model from corrmat — .matrix, an n-by-n Mat of correlations, plus .labels, a List of the n column names; corr_heatmap/corrplot draw instead and hand back no value. |
Examples
From the documentation, and run by the build -- the output and the figure below are what the engine actually produced. Simplest first.
f = logspace(0, 3, 200)
mag = 1 ./ sqrt(1 + (f / 100) .^ 2)
semilogx(f, mag)
figure()
x = 1 to 50
semilogy(x, exp(0.1 * x))
figure()
loglog(f, mag)
figure()
samples = randn(500, seed = 2)
hist(samples, bins = 15)
figure()
g = meshgrid(-3 to 3 step 0.2, -3 to 3 step 0.2)
Z = sin(sqrt(g.x .^ 2 + g.y .^ 2))
contour(g.x, g.y, Z)
figure()
contourf(g.x, g.y, Z)
figure()
tbl = table(a = randn(30, seed = 3), b = randn(30, seed = 4), c = randn(30, seed = 5))
corr_heatmap(tbl)
figure()
corrplot(tbl)
· hist: figure 31 (500 points, 15 bins)
from plotting
How it works
corr_heatmap(table) / corrplot(table) — pairwise Pearson correlation of the table's numeric columns.
From the note above this builtin in the interpreter, where the reasoning was written down as it was built.
See also
corr_heatmap, corrmat — documented in the same entry.