Example #1
0
def precision_recall_curve(df,
                           save_path,
                           style,
                           sem=None,
                           title='Precision-Recall Curve',
                           xlabel='Recall',
                           ylabel='Precision'):
    logger.info('Plotting precision-recall curve (%s) ...' % save_path)
    if not sem:
        # normal line plot
        myplt.line(df,
                   save_path,
                   style=style,
                   title=title,
                   xlabel=xlabel,
                   ylabel=ylabel)
    else:
        # include standard error of the mean (sem) in the plot
        myplt.line_fill_between(df,
                                sem,
                                save_path,
                                style=style,
                                title=title,
                                xlabel=xlabel,
                                ylabel=ylabel)
    logger.info('Finished plotting PR curve.')
Example #2
0
def receiver_operator_curve(df,
                            save_path,
                            style,
                            sem=None,
                            title='ROC Curve',
                            xlabel='False-Positive Rate',
                            ylabel='True-Positive Rate'):
    logger.info('Plotting receiver operator curve (%s) ...' % save_path)
    if not sem:
        # normal line plot
        myplt.line(df,
                   save_path,
                   style=style,
                   title='ROC Curve',
                   xlabel='False-Positive Rate',
                   ylabel='True-Positive Rate')
    else:
        # include standard error of the mean (sem) in plot
        myplt.line_fill_between(df,
                                sem,
                                save_path,
                                title=title,
                                xlabel=xlabel,
                                ylabel=ylabel)
    logger.info('Finished plotting ROC curve.')
Example #3
0
def receiver_operator_curve(df,
                            save_path,
                            style,
                            sem=None,
                            title='ROC Curve',
                            xlabel='False-Positive Rate',
                            ylabel='True-Positive Rate'):
    logger.info('Plotting receiver operator curve (%s) ...' % save_path)
    if not sem:
        # normal line plot
        myplt.line(df, save_path,
                   style=style,
                   title='ROC Curve',
                   xlabel='False-Positive Rate',
                   ylabel='True-Positive Rate')
    else:
        # include standard error of the mean (sem) in plot
        myplt.line_fill_between(df, sem, save_path,
                                title=title,
                                xlabel=xlabel,
                                ylabel=ylabel)
    logger.info('Finished plotting ROC curve.')
Example #4
0
def precision_recall_curve(df,
                           save_path,
                           style,
                           sem=None,
                           title='Precision-Recall Curve',
                           xlabel='Recall',
                           ylabel='Precision'):
    logger.info('Plotting precision-recall curve (%s) ...' % save_path)
    if not sem:
        # normal line plot
        myplt.line(df, save_path,
                   style=style,
                   title=title,
                   xlabel=xlabel,
                   ylabel=ylabel)
    else:
        # include standard error of the mean (sem) in the plot
        myplt.line_fill_between(df, sem, save_path,
                                style=style,
                                title=title,
                                xlabel=xlabel,
                                ylabel=ylabel)
    logger.info('Finished plotting PR curve.')
Example #5
0
def tsg_mutations_parameter(df, save_path, title='', xlabel='', ylabel=''):
    logger.info('Plotting tsg mutations while varying tsg score')
    myplt.line(df, save_path, title=title, ylabel=ylabel, xlabel=xlabel)
    logger.info('Finished plotting.')
Example #6
0
def onco_mutations_parameter(df, save_path, title='', xlabel='', ylabel=''):
    logger.info('Plotting oncogene mutations while varying recurrent '
                'parameter')
    # df.index.name = 'Oncogene Score'
    myplt.line(df, save_path, title=title, ylabel=ylabel, xlabel=xlabel)
    logger.info('Finished plotting.')