Hyunji

Age-Prediction correlation graph for test set with saved result data

# -*- coding: utf-8 -*-
"""age-prediction_graph_test_set.ipynb
Automatically generated by Colaboratory.
Original file is located at
https://colab.research.google.com/drive/16Rn0IDJTE6vJMOZtafDAI19AvGD9eK4C
"""
import pandas as pd
import matplotlib.pyplot as plt
plt.xlabel("Age")
plt.ylabel("Prediction")
df = pd.read_csv('/content/drive/MyDrive/2d-slice-set-networks-for-brain-age-master/data/test_pred - 시트1.csv')
df1 = pd.DataFrame(df).T
corr = df.corr(method='pearson')
print(corr)
X=df["Age"]
y=df["Prediction"]
plt.plot(X, y, 'o')
plt.plot(y,y)
plt.show
\ No newline at end of file