age_prediction_graph_test_set.py 562 Bytes
# -*- 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_predsv')
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