heatmap(cm, annot=True, fmt='d', cmap='Greens') plt.title('Confusion Matrix') plt.ylabel('True label') plt.xlabel('Predicted label') plt.show() Powered By This is the output: Random Forest Confusion Matrix Output Tada 🎉 You have successfully created your first Confusion Matrix ...
Correlation does not imply causation.When correlation between X and Y is close to 1, we cannot say that a change in X implies a subsequent change in Y. For example, consider two variables: “Number of ice creams sold daily in the span of one year” and “Number of sunburns in the sp...
It is useful where will be cluster analysis or deal with a large number of data sets. An example is given below. The commands will go like, #Seaborn Heatmap sns.heatmap(iris.corr(),linewidth=0.3,vmax=1.0,square=True, linecolor='black',annot=True) plt.show() the “heatmap()...
import seaborn as snsimport matplotlib.pyplot as pltcorrmat = data[columns].corr()mask= np.zeros_like(corrmat)mask[np.triu_indices_from(mask)] = Truesns.heatmap(corrmat,vmax=1, vmin=-1,annot=True, annot_kws={'fontsize':7},mask=mask,cmap=sns.diverging_palette(20,220,as_cmap=True)...