In [2]:
import matplotlib.pyplot as plt
%matplotlib inline
import seaborn as sns
import pandas as pd
import numpy as np
import os
In [6]:
#upload geneotypes and phenotypes
Gen0_genotypes = pd.read_pickle(os.path.expanduser('~/Experiments/lab3000_n1e1p1b2/lab3000_n1e1p1b2+Gen0+genotypes.p'))
Gen0_phenotypes = pd.read_pickle(os.path.expanduser('~/Experiments/lab3000_n1e1p1b2/lab3000_n1e1p1b2+Gen0+phenotypes.p'))
Gen0_phenotypes.sort_values('test_accuracy',ascending=False).head()
Out[6]:
In [7]:
#upload geneotypes and phenotypes
Gen1_genotypes = pd.read_pickle(os.path.expanduser('~/Experiments/lab3000_n1e1p1b2/lab3000_n1e1p1b2+Gen1+genotypes.p'))
Gen1_phenotypes = pd.read_pickle(os.path.expanduser('~/Experiments/lab3000_n1e1p1b2/lab3000_n1e1p1b2+Gen1+phenotypes.p'))
Gen1_phenotypes.sort_values('test_accuracy',ascending=False).head()
Out[7]:
In [9]:
#upload geneotypes and phenotypes
Gen2_genotypes = pd.read_pickle(os.path.expanduser('~/Experiments/lab3000_n1e1p1b2/lab3000_n1e1p1b2+Gen2+genotypes.p'))
Gen2_phenotypes = pd.read_pickle(os.path.expanduser('~/Experiments/lab3000_n1e1p1b2/lab3000_n1e1p1b2+Gen2+phenotypes.p'))
Gen2_phenotypes.sort_values('test_accuracy',ascending=False).head()
Out[9]:
In [18]:
sns.set(font_scale=1.3);
sns.set_style("whitegrid");
fig = plt.figure(figsize=(6,16));
ax1 = plt.subplot2grid((4,1),(0,0));
ax1 = sns.distplot(Gen2_phenotypes.test_accuracy,norm_hist=True,bins=50,
color=sns.color_palette()[2],label='Gen2_test',kde=False);
ax1 = sns.distplot(Gen2_phenotypes.train_accuracy,norm_hist=True,bins=50,
color=sns.color_palette()[4],label='Gen2_train',kde=False);
plt.ylabel("Count");
plt.xlabel("Accuracy");
plt.legend(loc='upper right',fontsize=16);
plt.xlim([0,1.0])
ax1 = plt.subplot2grid((4,1),(1,0));
ax1 = sns.distplot(Gen1_phenotypes.test_accuracy,norm_hist=True,bins=50,
color=sns.color_palette()[1],label='Gen1_test',kde=False);
ax1 = sns.distplot(Gen1_phenotypes.train_accuracy,norm_hist=True,bins=50,
color=sns.color_palette()[4],label='Gen1_train',kde=False)
plt.ylabel("Count");
plt.xlabel("Accuracy");
plt.legend(loc='upper right',fontsize=16);
plt.xlim([0,1.0])
ax1 = plt.subplot2grid((4,1),(2,0));
ax1 = sns.distplot(Gen0_phenotypes.test_accuracy,norm_hist=True,bins=50,
color=sns.color_palette()[0],label='Gen0_test',kde=False);
ax1 = sns.distplot(Gen0_phenotypes.train_accuracy,norm_hist=True,bins=50,
color=sns.color_palette()[4],label='Gen0_train',kde=False)
plt.ylabel("Count");
plt.xlabel("Accuracy");
plt.legend(loc='upper right',fontsize=16);
plt.xlim([0,1.0]);
plt.savefig('Gen0_Gen1_Gen2_population_accuracies.png')
In [ ]: