数据可视化:pandas透视图、seaborn热力图
1. 创建需要展示的数据
1 | import itertools |
输出:
layer_n activition seed results
0 1 tanh 11 4.261361
1 1 tanh 17 4.822595
2 1 tanh 19 4.929088
3 1 sigmod 11 6.698047
4 1 sigmod 17 7.020531
2. 绘制带误差的折线图展示训练结果
1 | # 绘制带误差的折线图,横轴为网络层数,纵轴为训练结果, |
3. 使用pandas透视图、seaborn热力图来展示
1 | # 创建透视图, |
ref:
pandas.pivot_table https://pandas.pydata.org/pandas-docs/stable/reference/api/pandas.pivot_table.html
seaborn.lineplot https://seaborn.pydata.org/generated/seaborn.lineplot.html
seaborn.heatplot https://seaborn.pydata.org/generated/seaborn.heatmap.html