improved froc visualisation
This commit is contained in:
		| @@ -28,21 +28,27 @@ print(experiments) | |||||||
| experiment_path = [] | experiment_path = [] | ||||||
| experiment_metrics = {} | experiment_metrics = {} | ||||||
| auroc = [] | auroc = [] | ||||||
|  |  | ||||||
|  | fig = plt.figure(1) | ||||||
|  | ax = fig.add_subplot(111) | ||||||
|  | for idx in range(len(args.experiment)): | ||||||
|  |     experiment_path = f'./../train_output/{experiments[idx]}/froc_metrics_focal_10.yml' | ||||||
|  |     experiment_metrics = read_yaml_to_dict(experiment_path) | ||||||
|  |  | ||||||
|  |     plt.plot(experiment_metrics["FP_per_case"], experiment_metrics["sensitivity"],color=colors[idx],linestyle=plot_type[idx]) | ||||||
|  |     ax.set(xscale="log") | ||||||
|  |     ax.axes.xaxis.set_minor_locator(tkr.LogLocator(base=10, subs='all')) | ||||||
|  |     ax.axes.xaxis.set_minor_formatter(tkr.NullFormatter()) | ||||||
|  |     ax.axes.xaxis.set_major_formatter(tkr.ScalarFormatter()) | ||||||
|  |     ax.axes.grid(True, which="both", ls="--", c='#d3d3d3') | ||||||
|  |     ax.axes.set_xlim(left=0, right=3) | ||||||
|  |     ax.axes.xaxis.set_major_locator(tkr.FixedLocator([0,0.1,1,3])) | ||||||
|  |  | ||||||
| for idx in range(len(args.experiment)): | for idx in range(len(args.experiment)): | ||||||
|     experiment_path = f'./../train_output/{experiments[idx]}/froc_metrics_focal_10.yml' |     experiment_path = f'./../train_output/{experiments[idx]}/froc_metrics_focal_10.yml' | ||||||
|     experiment_metrics = read_yaml_to_dict(experiment_path) |     experiment_metrics = read_yaml_to_dict(experiment_path) | ||||||
|     auroc.append(round(experiment_metrics['auroc'],3)) |     auroc.append(round(experiment_metrics['auroc'],3)) | ||||||
|  |  | ||||||
|     fig1, ax1 = plt.subplots(1,1) |  | ||||||
|     ax1.plot(experiment_metrics["FP_per_case"], experiment_metrics["sensitivity"],color=colors[idx],linestyle=plot_type[idx]) |  | ||||||
|     ax1.set(xscale="log") |  | ||||||
|     ax1.xaxis.set_minor_locator(tkr.LogLocator(base=10, subs='all')) |  | ||||||
|     ax1.xaxis.set_minor_formatter(tkr.NullFormatter()) |  | ||||||
|     ax1.xaxis.set_major_formatter(tkr.ScalarFormatter()) |  | ||||||
|     ax1.grid(True, which="both", ls="--", c='#d3d3d3') |  | ||||||
|     ax1.set_xlim(left=0, right=3) |  | ||||||
|     ax1.xaxis.set_major_locator(tkr.FixedLocator([0,0.1,1,3])) |  | ||||||
|  |  | ||||||
|     plt.figure(2) |     plt.figure(2) | ||||||
|     plt.plot(experiment_metrics["fpr"], experiment_metrics["tpr"],color=colors[idx],linestyle=plot_type[idx]) |     plt.plot(experiment_metrics["fpr"], experiment_metrics["tpr"],color=colors[idx],linestyle=plot_type[idx]) | ||||||
|  |  | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user