combine_fold_results.py
def makejoint(x,y,color,title):
    '''Plot x vs y where x are experimental values and y are predictions'''
    color_rgb = matplotlib.colors.colorConverter.to_rgb(color)
    colors = [seaborn.utils.set_hls_values(color_rgb, l=l)
              for l in np.linspace(1, 0, 12)]
    cmap = blend_palette(colors, as_cmap=True)
    g = sns.JointGrid(x=x,y=y)
    #g = g.plot_joint(plt.hexbin, cmap=cmap)
    g = g.plot_joint(plt.scatter, marker='.',color=color,alpha=.25,s=2)
    g = g.plot_joint(sns.kdeplot, shade=True,cmap=cmap,shade_lowest=False)
    g = g.plot_marginals(sns.distplot, color=color)
    g.ax_joint.set_xlabel('Experiment')
    g.ax_joint.set_ylabel('Prediction')
    plt.suptitle(title,verticalalignment='center')
    s = scipy.stats.spearmanr(x,y)[0]
    rmse = np.sqrt(np.mean(np.square(np.array(x)-np.array(y))))
    ax = g.ax_joint
    ax.set_ylim(0,12)
    ax.set_xlim(0,12)
    #ax.plot(x,y,'.',color=color,alpha=.25,markersize=2)
    ax.text(0.5, 0.05, 'Spearman = %.3f, RMSE = %.3f'%(s,rmse),fontsize=18,transform=ax.transAxes,horizontalalignment='center')
    plt.savefig('%s.pdf'%title,bbox_inches='tight')
Plot x vs y where x are experimental values and y are predictions
Plot x vs y where x are experimental values and y are predictions
Plot x vs y where x are experimental values and y are predictions
def makejoint(x,y,color,title):
    color_rgb = matplotlib.colors.colorConverter.to_rgb(color)
    colors = [seaborn.utils.set_hls_values(color_rgb, l=l)
              for l in np.linspace(1, 0, 12)]
    cmap = blend_palette(colors, as_cmap=True)
    g = sns.JointGrid(x=x,y=y)
    g = g.plot_joint(plt.scatter, marker='.',color=color,alpha=.25,s=2)
    g = g.plot_joint(sns.kdeplot, shade=True,cmap=cmap,shade_lowest=False)
    g = g.plot_marginals(sns.distplot, color=color)
    g.ax_joint.set_xlabel('Experiment')
    g.ax_joint.set_ylabel('Prediction')
    plt.suptitle(title,verticalalignment='center')
    s = scipy.stats.spearmanr(x,y)[0]
    rmse = np.sqrt(np.mean(np.square(np.array(x)-np.array(y))))
    ax = g.ax_joint
    ax.set_ylim(0,12)
    ax.set_xlim(0,12)
    ax.text(0.5, 0.05, 'Spearman = %.3f, RMSE = %.3f'%(s,rmse),fontsize=18,transform=ax.transAxes,horizontalalignment='center')
    plt.savefig('%s.pdf'%title,bbox_inches='tight')
def makejoint ( x , y , color , title ) : color_rgb = matplotlib . colors . colorConverter . to_rgb ( color ) colors = [ seaborn . utils . set_hls_values ( color_rgb , l = l ) for l in np . linspace ( 1 , 0 , 12 ) ] cmap = blend_palette ( colors , as_cmap = True ) g = sns . JointGrid ( x = x , y = y ) g = g . plot_joint ( plt . scatter , marker = '.' , color = color , alpha = .25 , s = 2 ) g = g . plot_joint ( sns . kdeplot , shade = True , cmap = cmap , shade_lowest = False ) g = g . plot_marginals ( sns . distplot , color = color ) g . ax_joint . set_xlabel ( 'Experiment' ) g . ax_joint . set_ylabel ( 'Prediction' ) plt . suptitle ( title , verticalalignment = 'center' ) s = scipy . stats . spearmanr ( x , y ) [ 0 ] rmse = np . sqrt ( np . mean ( np . square ( np . array ( x ) - np . array ( y ) ) ) ) ax = g . ax_joint ax . set_ylim ( 0 , 12 ) ax . set_xlim ( 0 , 12 ) ax . text ( 0.5 , 0.05 , 'Spearman = %.3f, RMSE = %.3f' % ( s , rmse ) , fontsize = 18 , transform = ax . transAxes , horizontalalignment = 'center' ) plt . savefig ( '%s.pdf' % title , bbox_inches = 'tight' )
Plot x vs y where x are experimental values and y are predictions
Plot x vs y where x are experimental values and y are predictions
'''Plot x vs y where x are experimental values and y are predictions''' #g = g.plot_joint(plt.hexbin, cmap=cmap) #ax.plot(x,y,'.',color=color,alpha=.25,markersize=2)
x
y
color
title