def generate_initial_report(df, plot_size_scalar, report_name):
'''
Print some initial summary data about our dataframe, plot a scatter_matrix,
and several box-plots / violin plots.
'''
# make the pdf
report = PdfPages(OUTPUT_DIR + report_name + '.pdf')
# Generate a scatter matrix
c_count = len(df.columns)
scatter_fig, ax_list = plt.subplots(figsize=(c_count*plot_size_scalar, c_count*plot_size_scalar))
pd.tools.plotting.scatter_matrix(df, diagonal='kde', ax=ax_list)
report.savefig(scatter_fig)
# Generate the box/violin overlay plot
box_fig = box_plots(df, plot_size_scalar, plot_size_scalar*1.5)
report.savefig(box_fig)
report.close()
balance_preditctor.py 文件源码
python
阅读 20
收藏 0
点赞 0
评论 0
评论列表
文章目录