visualization.py 文件源码

python
阅读 31 收藏 0 点赞 0 评论 0

项目:Supply-demand-forecasting 作者: LevinJ 项目源码 文件源码
def disp_gap_bydate(self):
        gaps_mean = self.gapdf.groupby('time_date')['gap'].mean()
        gaps_mean.plot(kind='bar')
        plt.ylabel('Mean of gap')
        plt.title('Date/Gap Correlation')
#         for i in gaps_mean.index:
#             plt.plot([i,i], [0, gaps_mean[i]], 'k-')
        plt.show()
        return

#     def drawGapDistribution(self):
#         self.gapdf[self.gapdf['gapdf'] < 10]['gapdf'].hist(bins=50)
# #         sns.distplot(self.gapdf['gapdf']);
# #         sns.distplot(self.gapdf['gapdf'], hist=True, kde=False, rug=False)
# #         plt.hist(self.gapdf['gapdf'])
#         plt.show()
#         return
#     def drawGapCorrelation(self):
#         _, (ax1, ax2) = plt.subplots(nrows=2, ncols=1)
#         res = self.gapdf.groupby('start_district_id')['gapdf'].sum()
#         ax1.bar(res.index, res.values)
#         res = self.gapdf.groupby('time_slotid')['gapdf'].sum()
#         ax2.bar(res.index.map(lambda x: x[11:]), res.values)
#         plt.show()
#         return
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号