<jupyter_start><jupyter_text>CNV<jupyter_code>x_R0 = [df_r0AE.values.mean(), df_r0PCA.values.mean(), df_r0Z.values.mean()] 
std_R0 = [df_r0AE.values.std(), df_r0PCA.values.std(), df_r0Z.values.std()]
x_labels = ['AE', 'PCA', 'Z']
colors_R0 = ['#c54630', '#c54630', '#c54630']
edgecol = "black"
linspace = [np.zeros(len(df_r0AE.values)), np.ones(len(df_r0AE.values)), 2*np.ones(len(df_r0AE.values))]
swarm_r0 = [df_r0AE.values, df_r0PCA.values, df_r0Z.values]
import matplotlib.cm as cm
import seaborn as sns
sns.set_style("white")
from matplotlib.colors import Normalize
my_cmap = cm.get_cmap('Blues')
my_norm = Normalize(vmin=0, vmax=6)
fig, ax = plt.subplots(1,1,figsize=(8, 8))
#ax.set_ylim(ylimError)

ax.set_xlim(-1,3)
ax.set_ylabel("AUC",size=28)
ax.tick_params(axis='y',labelsize=24)
ax.tick_params(axis='x',labelsize=24)
ax.set_xticks(np.arange(0, 3, 1))
ax.set_yticks(np.arange(0.3, 1.01, 0.1))
ax.set_ylim(0.3,1.1)
ax.set_title("R0", size=36)
ax.set_xticklabels(x_labels, rotation=0)
ax.spines['left'].set_linewidth(3)
ax.spines['bottom'].set_linewidth(3)
ax.hlines(0.5,-1,9,linestyles='dashed',linewidth=3)

ax.bar(np.arange(0,3),x_R0, color=colors_R0, alpha=1,  linewidth=2, edgecolor=edgecol, width=1, yerr=std_R0, capsize=8, label="R0", error_kw=dict(lw=2, capsize=8, capthick=2, ecolor=edgecol))

# R0 statistical annotation
x1, x2 = 0, 2   # columns 'Sat' and 'Sun' (first column: 0, see plt.xticks())
y1 = np.max(x_R0)+np.max(std_R0)+0.1
y2 = np.max(x_R0)+np.max(std_R0)+0.1
ax.plot([x1, x2],[y1,y2], lw=1.5,c="black")
ax.text((x1+x2)*.5, y1, "*", ha='center', va='bottom', color="black", fontsize=28)

x1, x2 = 1, 2   # columns 'Sat' and 'Sun' (first column: 0, see plt.xticks())
y1 = np.max(x_R0)+np.max(std_R0) 
y2 = np.max(x_R0)+np.max(std_R0)
ax.plot([x1, x2],[y1,y2], lw=1.5,c="black")
ax.text((x1+x2)*.5, y1, "*", ha='center', va='bottom', color="black", fontsize=28)

ax.scatter(linspace,swarm_r0, zorder=10, alpha=0.2, color="black")

sns.despine()

#plt.legend(fontsize=24)

fig.tight_layout()
fig.savefig('AUC_CNV_r0.svg', dpi=200)<jupyter_output><empty_output><jupyter_text>SCZH<jupyter_code>sc_r0AE = pd.read_csv("../tests/auc_RISH0_AutoEncoder_SCHZ.csv", header=None)
sc_r0PCA = pd.read_csv("../tests/auc_RISH0_PCA_SCHZ.csv", header=None)
sc_r0Z = pd.read_csv("../tests/auc_RISH0_Z-score_SCHZ.csv", header=None)
sc_x_R0 = [sc_r0AE.values.mean(), sc_r0PCA.values.mean(), sc_r0Z.values.mean()]
sc_std_R0 = [sc_r0AE.values.std(), sc_r0PCA.values.std(), sc_r0Z.values.std()]
x_labels = ['AE', 'PCA', 'Z']
colors_R0 = ['#c54630', '#c54630', '#c54630']
edgecol = "black"
linspace = [np.zeros(len(sc_r0AE.values)), np.ones(len(sc_r0AE.values)), 2*np.ones(len(sc_r0AE.values))]
swarm_r0 = [sc_r0AE.values, sc_r0PCA.values, sc_r0Z.values]
import matplotlib.cm as cm
import seaborn as sns
sns.set_style("white")
from matplotlib.colors import Normalize
my_cmap = cm.get_cmap('Blues')
my_norm = Normalize(vmin=0, vmax=6)
fig, ax = plt.subplots(1,1,figsize=(8, 8))
#ax.set_ylim(ylimError)

ax.set_xlim(-1,3)
ax.set_ylabel("AUC",size=28)
ax.tick_params(axis='y',labelsize=24)
ax.tick_params(axis='x',labelsize=24)
ax.set_xticks(np.arange(0, 3, 1))
ax.set_yticks(np.arange(0.3, 1.01, 0.1))
ax.set_ylim(0.2,1)
ax.set_title("R0", size=36)
ax.set_xticklabels(x_labels, rotation=0)
ax.spines['left'].set_linewidth(3)
ax.spines['bottom'].set_linewidth(3)
ax.hlines(0.5,-1,9,linestyles='dashed',linewidth=3)

ax.bar(np.arange(0,3),sc_x_R0, color=colors_R0, alpha=1,  linewidth=2, edgecolor=edgecol, width=1, yerr=sc_std_R0, capsize=8, label="R0", error_kw=dict(lw=2, capsize=8, capthick=2, ecolor=edgecol))


# R0 statistical annotation

# R0 statistical annotation
x1, x2 = 0, 1   # columns 'Sat' and 'Sun' (first column: 0, see plt.xticks())
y1 = np.max(sc_x_R0)+np.max(sc_std_R0)+0.1
y2 = np.max(sc_x_R0)+np.max(sc_std_R0)+0.1
ax.plot([x1, x2],[y1,y2], lw=1.5,c="black")
ax.text((x1+x2)*.5, y1, "*", ha='center', va='bottom', color="black", fontsize=28)

x1, x2 = 0, 2   # columns 'Sat' and 'Sun' (first column: 0, see plt.xticks())
y1 = np.max(sc_x_R0)+np.max(sc_std_R0)+0.2
y2 = np.max(sc_x_R0)+np.max(sc_std_R0)+0.2
ax.plot([x1, x2],[y1,y2], lw=1.5,c="black")
ax.text((x1+x2)*.5, y1, "*", ha='center', va='bottom', color="black", fontsize=28)

x1, x2 = 1, 2   # columns 'Sat' and 'Sun' (first column: 0, see plt.xticks())
y1 = np.max(sc_x_R0)+np.max(sc_std_R0)+0.05
y2 = np.max(sc_x_R0)+np.max(sc_std_R0)+0.05
ax.plot([x1, x2],[y1,y2], lw=1.5,c="black")
ax.text((x1+x2)*.5, y1, "*", ha='center', va='bottom', color="black", fontsize=28)

ax.scatter(linspace,swarm_r0, zorder=10, alpha=0.2, color="black")
sns.despine()

#plt.legend(fontsize=24)

fig.tight_layout()
fig.savefig('AUC_CNP.svg', dpi=200)<jupyter_output><empty_output>
{'fraction_non_alphanumeric': 0.21765697429414244, 'fraction_numerical': 0.0695322376738306, 'mean_word_length': 6.924874791318865, 'pattern_counts': {'":': 0, '<': 9, '<?xml version=': 0, '>': 9, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'chain_length': '2', 'dir': 'jupyter-structured-clean-dedup', 'id': '195916', 'license': 'Apache-2.0', 'n_tokens_mistral': 2417, 'n_tokens_neox': 2321, 'n_words': 325, 'path': 'examples/AUC.ipynb', 'repo_name': 'chamberm/Detect', 'size': '4746'}