Exp 2 A
Exp 2 A
Output:
The correlation for each of the attributes mentioned in the California dataset calculated
Description:
i. Introduction to correlation matrix
A correlation matrix is a table displaying correlation coefficients that measure the strength
and direction of relationships between variables.
The matrix shows how all the possible pairs of values in a table are related to each other.
It is a powerful tool for summarizing a large data set and finding and showing patterns in the
data. It is often shown as a table, with each variable listed in both the rows and the columns
and the correlation coefficient between each pair of variables written in each cell.
The correlation coefficient ranges from -1 to +1, where -1 means a perfect negative
correlation, +1 means a perfect positive correlation, and 0 means there is zero
correlation between the variables
import pandas as pd
import seaborn as sns
import matplotlib.pyplot as plt
from sklearn.datasets import fetch_california_housing
Output of program
Note: Above figure to be drawn on blank plane page of journal in output section