Hyunji

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

1 +# -*- coding: utf-8 -*-
2 +"""age-prediction_graph_validation_set.ipynb
3 +
4 +Automatically generated by Colaboratory.
5 +
6 +Original file is located at
7 + https://colab.research.google.com/drive/16Rn0IDJTE6vJMOZtafDAI19AvGD9eK4C
8 +"""
9 +
10 +import pandas as pd
11 +import matplotlib.pyplot as plt
12 +
13 +plt.xlabel("Age")
14 +plt.ylabel("Prediction")
15 +
16 +df = pd.read_csv('/content/drive/MyDrive/2d-slice-set-networks-for-brain-age-master/data/valid_pred - 시트1.csv')
17 +df1 = pd.DataFrame(df).T
18 +corr = df.corr(method='pearson')
19 +print(corr)
20 +
21 +X=df["Age"]
22 +y=df["Prediction"]
23 +
24 +plt.plot(X, y, 'o')
25 +plt.plot(y,y)
26 +plt.show
...\ No newline at end of file ...\ No newline at end of file