-
Notifications
You must be signed in to change notification settings - Fork 0
/
samp_comp_plot.py
73 lines (61 loc) · 1.65 KB
/
samp_comp_plot.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
import matplotlib.pyplot as plt
import numpy as np
import pandas as pd
from scipy.stats import sem
df = pd.read_csv("data.txt", sep="\t").groupby("Other_subs").agg([np.mean, sem])
plt.figure(figsize=(9, 3))
plt.subplot(131)
plt.errorbar(x=df.index, y=df["corr(scores)"]["mean"], yerr=df["corr(scores)"]["sem"])
plt.xscale("log")
plt.title("Scores corr.")
plt.xlabel("No of other subjs")
plt.ylabel("corr")
plt.subplot(132)
plt.errorbar(x=df.index, y=df["corr(steps)"]["mean"], yerr=df["corr(steps)"]["sem"])
plt.xscale("log")
plt.title("Steps corr.")
plt.xlabel("No of other subjs")
plt.ylabel("corr")
plt.subplot(133)
plt.errorbar(
x=df.index, y=df["corr(accuracy)"]["mean"], yerr=df["corr(accuracy)"]["sem"]
)
plt.xscale("log")
plt.title("Accuracy corr.")
plt.xlabel("No of other subjs")
plt.ylabel("corr")
plt.tight_layout()
plt.show()
plt.figure(figsize=(12, 4))
plt.subplot(131)
plt.errorbar(
x=np.arange(len(df.index)),
y=df["corr(scores)"]["mean"],
yerr=df["corr(scores)"]["sem"],
)
plt.xticks(np.arange(len(df.index)), df.index)
plt.title("Scores corr.")
plt.xlabel("No of other subjs")
plt.ylabel("corr")
plt.subplot(132)
plt.errorbar(
x=np.arange(len(df.index)),
y=df["corr(steps)"]["mean"],
yerr=df["corr(steps)"]["sem"],
)
plt.xticks(np.arange(len(df.index)), df.index)
plt.title("Steps corr.")
plt.xlabel("No of other subjs")
plt.ylabel("corr")
plt.subplot(133)
plt.errorbar(
x=np.arange(len(df.index)),
y=df["corr(accuracy)"]["mean"],
yerr=df["corr(accuracy)"]["sem"],
)
plt.xticks(np.arange(len(df.index)), df.index)
plt.title("Accuracy corr.")
plt.xlabel("No of other subjs")
plt.ylabel("corr")
plt.tight_layout()
plt.show()