def show_heat_map_to(self, target='sentiment'):
correlations = self.data.corr()[target].sort_values(ascending=False)
plt.figure(figsize=(40, 6))
correlations.drop(target).plot.bar()
pd.set_option('precision', 2)
plt.xticks(rotation=90, fontsize=7)
plt.yticks(rotation=360)
plt.suptitle('The Heatmap of Correlation With ' + target)
plt.show()
评论列表
文章目录