rasa/core/test.py
def plot_curve(output: Text, no_stories: List[int]) -> None:
    """Plot the results from run_comparison_evaluation.

    Args:
        output: Output directory to save resulting plots to
        no_stories: Number of stories per run
    """
    import matplotlib.pyplot as plt
    import numpy as np
    from rasa.core import utils

    ax = plt.gca()

    # load results from file
    data = utils.read_json_file(os.path.join(output, 'results.json'))
    x = no_stories

    # compute mean of all the runs for keras/embed policies
    for label in data.keys():
        if len(data[label]) == 0:
            continue
        mean = np.mean(data[label], axis=0)
        std = np.std(data[label], axis=0)
        ax.plot(x, mean, label=label, marker='.')
        ax.fill_between(x,
                        [m - s for m, s in zip(mean, std)],
                        [m + s for m, s in zip(mean, std)],
                        color='#6b2def',
                        alpha=0.2)
    ax.legend(loc=4)
    ax.set_xlabel("Number of stories present during training")
    ax.set_ylabel("Number of correct test stories")
    plt.savefig(os.path.join(output, 'model_comparison_graph.pdf'),
                format='pdf')
    plt.show()
Plot the results from run_comparison_evaluation.

    Args:
        output: Output directory to save resulting plots to
        no_stories: Number of stories per run
    
Plot the results from run_comparison_evaluation.
Plot the results from run_comparison_evaluation .
def plot_curve(output: Text, no_stories: List[int]) -> None:
    import matplotlib.pyplot as plt
    import numpy as np
    from rasa.core import utils
    ax = plt.gca()
    data = utils.read_json_file(os.path.join(output, 'results.json'))
    x = no_stories
    for label in data.keys():
        if len(data[label]) == 0:
            continue
        mean = np.mean(data[label], axis=0)
        std = np.std(data[label], axis=0)
        ax.plot(x, mean, label=label, marker='.')
        ax.fill_between(x,
                        [m - s for m, s in zip(mean, std)],
                        [m + s for m, s in zip(mean, std)],
                        color='#6b2def',
                        alpha=0.2)
    ax.legend(loc=4)
    ax.set_xlabel("Number of stories present during training")
    ax.set_ylabel("Number of correct test stories")
    plt.savefig(os.path.join(output, 'model_comparison_graph.pdf'),
                format='pdf')
    plt.show()
def plot_curve ( output : Text , no_stories : List [ int ] ) -> None : import matplotlib . pyplot as plt import numpy as np from rasa . core import utils ax = plt . gca ( ) data = utils . read_json_file ( os . path . join ( output , 'results.json' ) ) x = no_stories for label in data . keys ( ) : if len ( data [ label ] ) == 0 : continue mean = np . mean ( data [ label ] , axis = 0 ) std = np . std ( data [ label ] , axis = 0 ) ax . plot ( x , mean , label = label , marker = '.' ) ax . fill_between ( x , [ m - s for m , s in zip ( mean , std ) ] , [ m + s for m , s in zip ( mean , std ) ] , color = '#6b2def' , alpha = 0.2 ) ax . legend ( loc = 4 ) ax . set_xlabel ( "Number of stories present during training" ) ax . set_ylabel ( "Number of correct test stories" ) plt . savefig ( os . path . join ( output , 'model_comparison_graph.pdf' ) , format = 'pdf' ) plt . show ( )
Plot the results from run_comparison_evaluation.
Plot the results from run_comparison_evaluation .
"""Plot the results from run_comparison_evaluation.

    Args:
        output: Output directory to save resulting plots to
        no_stories: Number of stories per run
    """ # load results from file # compute mean of all the runs for keras/embed policies
output
Text
Output directory to save resulting plots to
Output directory to save resulting plots to
no_stories
List[int]
Number of stories per run
Number of stories per run