def target_plot(self):
target_type = self.input_data.metadata.loc[self.target].type
target_data = self.input_data.df[self.target]
sns.set(style="white", color_codes=True)
if not self.run_time_config['is_time_series']:
if target_type == ColType.BINARY:
plt.figure(figsize=(6, 1))
sns.barplot(target_data.sum() / target_data.shape[0])
plt.xlim([0, 1])
plt.title(target_data.name + ' rate')
elif target_type == ColType.NUMERIC or target_type == ColType.ORDINAL:
plt.figure(figsize=(6, 2))
ax = sns.distplot(target_data, hist_kws=dict(edgecolor='black'))
ax.set_xlim(target_data.min(), target_data.max())
plt.title(target_data.name + ' histogram')
else:
self.time_series_target_plot()
评论列表
文章目录