(recalls, proposal_nums)
Plot Proposal_num-Recalls curve.

    Args:
        recalls(ndarray or list): shape (k,)
        proposal_nums(ndarray or list): same shape as `recalls`
Plot Proposal_num-Recalls curve.
Plot Proposal_num - Recalls curve .
def plot_num_recall(recalls, proposal_nums):
    """Plot Proposal_num-Recalls curve.

    Args:
        recalls(ndarray or list): shape (k,)
        proposal_nums(ndarray or list): same shape as `recalls`
    """
    if isinstance(proposal_nums, np.ndarray):
        _proposal_nums = proposal_nums.tolist()
    else:
        _proposal_nums = proposal_nums
    if isinstance(recalls, np.ndarray):
        _recalls = recalls.tolist()
    else:
        _recalls = recalls

    import matplotlib.pyplot as plt
    f = plt.figure()
    plt.plot([0] + _proposal_nums, [0] + _recalls)
    plt.xlabel('Proposal num')
    plt.ylabel('Recall')
    plt.axis([0, proposal_nums.max(), 0, 1])
    f.show()
def plot_num_recall ( recalls , proposal_nums ) : if isinstance ( proposal_nums , np . ndarray ) : _proposal_nums = proposal_nums . tolist ( ) else : _proposal_nums = proposal_nums if isinstance ( recalls , np . ndarray ) : _recalls = recalls . tolist ( ) else : _recalls = recalls import matplotlib . pyplot as plt f = plt . figure ( ) plt . plot ( [ 0 ] + _proposal_nums , [ 0 ] + _recalls ) plt . xlabel ( 'Proposal num' ) plt . ylabel ( 'Recall' ) plt . axis ( [ 0 , proposal_nums . max ( ) , 0 , 1 ] ) f . show ( )