Current location - Training Enrollment Network - Mathematics courses - 202 1- 12-22 understanding the dispersion matrix (pairwise graph)
202 1- 12-22 understanding the dispersion matrix (pairwise graph)
A PairGrid needs to fill three grid parts: upper triangle, lower triangle and diagonal.

map_upper? Is an upper triangle, a function that accepts two arrays of variables. Scatter charts above and below the diagonal show the relationship between variables.

Map_lower is the triangle below. Scatter charts above and below the diagonal show the relationship between variables.

Map_diag accepts functions of a single array. The histogram of diagonal position allows us to see the distribution of each variable.

Use two-dimensional kernel density estimation (i.e. density map) in the triangle below.

The scatter plot matrix will construct two basic graphs: histogram and scatter plot. The histogram of diagonal position shows us the distribution of each variable, while the scatter charts at the top and bottom of diagonal show the relationship between variables. For example, the scatter plot on the leftmost side of the second line shows the relationship between life_exp and year.

The diagonal of the matrix is the histogram of each feature and the color is the label of the training set.