Environmental affects on AI


In [1]:
%run '../ipython_startup.py'


Importing commonly used libraries: os, sys, numpy as np, scipy as sp, pandas as pd, matplotlib as mp, matplotlib.pyplot as plt, datetime as dt, mclib_Python/flagging as fg
Creating project level variables: MCLAB = /home/jfear/mclab, PROJ = /home/jfear/mclab/cegs_ase_paper, TODAY = 20150901
Adding ['scripts/mclib_Python', 'scripts/ase_Python'] to PYTHONPATH

In [2]:
from sas7bdat import SAS7BDAT as SAS

In [5]:
with SAS(os.path.join(PROJ, 'sas_data/clean_ase_sbs.sas7bdat')) as FH:
    df = FH.to_data_frame()


[clean_ase_sbs.sas7bdat] header length 65536 != 8192
WARNING:../../sas_data/clean_ase_sbs.sas7bdat:[clean_ase_sbs.sas7bdat] header length 65536 != 8192

In [32]:
fig, (ax1, ax2, ax3) = plt.subplots(1, 3, figsize=(8, 3), sharex=True, sharey=True)

xlab = r'q5 Mean $\theta$ Mated'
ylab = r'q5 Mean $\theta$ Virgin'


grp = df.groupby('line')
grp.get_group('r324').plot(kind='scatter', x='q5_mean_theta_m', y='q5_mean_theta_v', title='r324', ax=ax1, rot=90)
grp.get_group('r365').plot(kind='scatter', x='q5_mean_theta_m', y='q5_mean_theta_v', title='r365', ax=ax2, rot=90)
grp.get_group('w47').plot(kind='scatter', x='q5_mean_theta_m', y='q5_mean_theta_v', title='w47', ax=ax3, rot=90)

ax1.plot([0, 1], [0, 1], color='r', lw=2)
ax2.plot([0, 1], [0, 1], color='r', lw=2)
ax3.plot([0, 1], [0, 1], color='r', lw=2)

ax1.set_xlabel(xlab); ax1.set_ylabel(ylab)
ax2.set_xlabel(xlab); ax2.set_ylabel(ylab)
ax3.set_xlabel(xlab); ax3.set_ylabel(ylab)


plt.tight_layout()
fig.savefig(os.path.join(PROJ, 'pipeline_output/ase_summary/scatter_q5_mean_theta_mated_vs_virgin_selected.png'), dpi=300)



In [ ]: