pipeline/evaluate.py
def write_barplot(fname, df, labels, sortby='f1', title=''):
    """Write a barplot from the DataFrame given.

    :param str fname: Path of file to write barplot to. If no extension is
        given, pdf will be used.
    :param list labels: Ordering of bars to use in each column.
    :param str sortby: Column to sort methods by (greatest -> least).
    :param str title: Title of the barplot.
    """
    plt.cla()
    fig, ax = plt.subplots()
    frame = df[labels].reindex_axis(labels, 1).sort(sortby, ascending=False)
    frame.plot(kind='bar', color=palette[:len(labels)], width=0.85,
               title=title, figsize=(24,16), ax=ax)

    ncols = len(labels)/2
    ncols = 4 if ncols < 4 else ncols
    ax.legend(loc='upper center', ncol=ncols,
              fancybox=True, shadow=True)
    ax.xaxis.grid(False)

    fname = check_extension(fname)
    fig.savefig(fname, bbox_inches='tight', dpi=300)
    fig.clear()
Write a barplot from the DataFrame given.

    :param str fname: Path of file to write barplot to. If no extension is
        given, pdf will be used.
    :param list labels: Ordering of bars to use in each column.
    :param str sortby: Column to sort methods by (greatest -> least).
    :param str title: Title of the barplot.
    
Write a barplot from the DataFrame given.
Write a barplot from the DataFrame given .
def write_barplot(fname, df, labels, sortby='f1', title=''):
    plt.cla()
    fig, ax = plt.subplots()
    frame = df[labels].reindex_axis(labels, 1).sort(sortby, ascending=False)
    frame.plot(kind='bar', color=palette[:len(labels)], width=0.85,
               title=title, figsize=(24,16), ax=ax)
    ncols = len(labels)/2
    ncols = 4 if ncols < 4 else ncols
    ax.legend(loc='upper center', ncol=ncols,
              fancybox=True, shadow=True)
    ax.xaxis.grid(False)
    fname = check_extension(fname)
    fig.savefig(fname, bbox_inches='tight', dpi=300)
    fig.clear()
def write_barplot ( fname , df , labels , sortby = 'f1' , title = '' ) : plt . cla ( ) fig , ax = plt . subplots ( ) frame = df [ labels ] . reindex_axis ( labels , 1 ) . sort ( sortby , ascending = False ) frame . plot ( kind = 'bar' , color = palette [ : len ( labels ) ] , width = 0.85 , title = title , figsize = ( 24 , 16 ) , ax = ax ) ncols = len ( labels ) / 2 ncols = 4 if ncols < 4 else ncols ax . legend ( loc = 'upper center' , ncol = ncols , fancybox = True , shadow = True ) ax . xaxis . grid ( False ) fname = check_extension ( fname ) fig . savefig ( fname , bbox_inches = 'tight' , dpi = 300 ) fig . clear ( )
Write a barplot from the DataFrame given.
Write a barplot from the DataFrame given .
"""Write a barplot from the DataFrame given.

    :param str fname: Path of file to write barplot to. If no extension is
        given, pdf will be used.
    :param list labels: Ordering of bars to use in each column.
    :param str sortby: Column to sort methods by (greatest -> least).
    :param str title: Title of the barplot.
    """
fname
Path of file to write barplot to. If no extension is
given, pdf will be used.
Path of file to write barplot to . If no extension is given pdf will be used .
df
labels
Ordering of bars to use in each column.
Ordering of bars to use in each column .
sortby
Column to sort methods by (greatest -> least).
Column to sort methods by ( greatest - > least ) .
title
Title of the barplot.
Title of the barplot .