Exemplo n.º 1
0
def boxplot_accuracies(filenames):
    values = []
    names = []
    for i, filename in enumerate(filenames):
        ms = metrics.get_valid_metrics(metrics.load(filename))
        values.append([m['acc'] for m in ms])
        names.append("Exp {0}".format(i))
    metrics.boxplot('Experiments', 'Accuracy', names, values).show()
Exemplo n.º 2
0
def plot_confusion_matrix(filename, normalize):
    """Plot confusion matrix."""
    m = metrics.aggregate(metrics.load(filename))
    if normalize:
        m = metrics.normalize_confusion_matrix(m)
    metrics.plot_confusion_matrix(m).show()
Exemplo n.º 3
0
def plot_loss(run_number, filename):
    """Plot loss."""
    metrics.plot_loss(metrics.load(filename)[run_number]).show()
Exemplo n.º 4
0
def plot_accuracy(run_number, filename):
    """Plot accuracy."""
    metrics.plot_accuracy(metrics.load(filename)[run_number]).show()
Exemplo n.º 5
0
def show_all(filenames):
    """Show all metrics."""
    for filename in filenames:
        print("##### {0}\n".format(filename))
        metrics.show(metrics.aggregate(metrics.load(filename)))