| if args.save: | if args.save: | ||||
| plt.savefig("{}{}_plot.pdf".format(args.save, csv.replace(".csv", ""))) | plt.savefig("{}{}_plot.pdf".format(args.save, csv.replace(".csv", ""))) | ||||
| # plot correlations | |||||
| corr_pairs = [ | |||||
| ["goodput_rolling", "RSRQ"], | |||||
| ["goodput_rolling", "RSRP"], | |||||
| ["goodput_rolling", "RSSI"], | |||||
| ["goodput_rolling", "SINR"], | |||||
| ["goodput_rolling", "downlink_cqi"], | |||||
| ] | |||||
| for pair in corr_pairs: | |||||
| # spearman and pearson | |||||
| sp = transmission_df[pair[0]].corr(transmission_df[pair[1]], method="spearman") | |||||
| pe = transmission_df[pair[0]].corr(transmission_df[pair[1]], method="pearson") | |||||
| title = "{}/{} spearman: {} pearson: {}".format(pair[0], pair[1], round(sp, 4), round(pe, 4)) | |||||
| transmission_df.plot.scatter(x=pair[0], y=pair[1], c="DarkBlue", title=title) | |||||
| if args.save: | |||||
| plt.savefig("{}{}_corr_{}_and_{}.pdf".format(args.save, csv.replace(".csv", ""), pair[0], pair[1])) | |||||
| plt.clf() | |||||
| counter += 1 | counter += 1 | ||||
| plt.clf() | plt.clf() |