r2 = dc.metrics.pearson_r2_score(y_task, y_other)
print("r2 for %s-%s is %f" % (task, other_task, r2))
task_results.append(r2)
print("Task %d" % task)
print(task_results)
all_results.append(task_results)
print("Writing results to uv_corr.csv")
df = pd.DataFrame(all_results)
After Change
// the histogram of the data
n, bins, patches = plt.hist(np.array(all_results), 50, normed=True, stacked=True,
facecolor="green", alpha=0.75)
plt.xlabel("Cross-task Correlations")
plt.ylabel("Probability Density")
plt.title("Histogram of UV Intertask Correlations")
plt.grid(True)
plt.savefig("UV_correlations.png")