示例#1
0
def plot_misclasses_mean_std_for_exps_with_tube(df):
    test_misclasses = extract_from_results(
        df, lambda r: r.monitor_channels['test_misclass'])
    test_misclasses, exps_by_epoch = get_padded_chan_vals(test_misclasses,
                                                          pad_by=np.nan)

    valid_misclasses = extract_from_results(
        df, lambda r: r.monitor_channels['valid_misclass'])
    valid_misclasses, exps_by_epoch = get_padded_chan_vals(valid_misclasses,
                                                           pad_by=np.nan)
    train_misclasses = extract_from_results(
        df, lambda r: r.monitor_channels['train_misclass'])
    train_misclasses, exps_by_epoch = get_padded_chan_vals(train_misclasses,
                                                           pad_by=np.nan)
    plot_with_tube(range(train_misclasses.shape[1]),
                   np.nanmean(train_misclasses, axis=0),
                   np.nanstd(train_misclasses, axis=0))
    plot_with_tube(range(valid_misclasses.shape[1]),
                   np.nanmean(valid_misclasses, axis=0),
                   np.nanstd(valid_misclasses, axis=0),
                   color=seaborn.color_palette()[1])
    plot_with_tube(range(test_misclasses.shape[1]),
                   np.nanmean(test_misclasses, axis=0),
                   np.nanstd(test_misclasses, axis=0),
                   color=seaborn.color_palette()[2])
    plt.plot(exps_by_epoch / float(exps_by_epoch[0]),
             color='black',
             linestyle='dashed')
示例#2
0
def plot_mean_std_misclasses_over_time(misclasses):
    padded_misclasses, _ = get_padded_chan_vals(misclasses['train'])
    plot_mean_and_std(padded_misclasses, color=seaborn.color_palette()[0])
    padded_misclasses, _ = get_padded_chan_vals(misclasses['valid'])
    plot_mean_and_std(padded_misclasses, color=seaborn.color_palette()[1])
    padded_misclasses, n_exps_by_epoch = get_padded_chan_vals(misclasses['test'])
    plot_mean_and_std(padded_misclasses, color=seaborn.color_palette()[2])
    plt.plot(n_exps_by_epoch / float(n_exps_by_epoch[0]), color='black', lw=1)
    plt.ylim(0,1)
示例#3
0
def plot_mean_std_misclasses_over_time(misclasses):
    padded_misclasses, _ = get_padded_chan_vals(misclasses['train'])
    plot_mean_and_std(padded_misclasses, color=seaborn.color_palette()[0])
    padded_misclasses, _ = get_padded_chan_vals(misclasses['valid'])
    plot_mean_and_std(padded_misclasses, color=seaborn.color_palette()[1])
    padded_misclasses, n_exps_by_epoch = get_padded_chan_vals(
        misclasses['test'])
    plot_mean_and_std(padded_misclasses, color=seaborn.color_palette()[2])
    plt.plot(n_exps_by_epoch / float(n_exps_by_epoch[0]), color='black', lw=1)
    plt.ylim(0, 1)
示例#4
0
def plot_misclasses_mean_std_for_exps_with_tube(df):
    test_misclasses = extract_from_results(df, lambda r: r.monitor_channels['test_misclass'])
    test_misclasses, exps_by_epoch = get_padded_chan_vals(test_misclasses, pad_by=np.nan)

    valid_misclasses = extract_from_results(df, lambda r: r.monitor_channels['valid_misclass'])
    valid_misclasses, exps_by_epoch = get_padded_chan_vals(valid_misclasses, pad_by=np.nan)
    train_misclasses = extract_from_results(df, lambda r: r.monitor_channels['train_misclass'])
    train_misclasses, exps_by_epoch = get_padded_chan_vals(train_misclasses, pad_by=np.nan)
    plot_with_tube(range(train_misclasses.shape[1]),np.nanmean(train_misclasses, axis=0),
          np.nanstd(train_misclasses, axis=0))
    plot_with_tube(range(valid_misclasses.shape[1]),np.nanmean(valid_misclasses, axis=0),
              np.nanstd(valid_misclasses, axis=0), color=seaborn.color_palette()[1])
    plot_with_tube(range(test_misclasses.shape[1]),np.nanmean(test_misclasses, axis=0),
              np.nanstd(test_misclasses, axis=0), color=seaborn.color_palette()[2])
    plt.plot(exps_by_epoch / float(exps_by_epoch[0]), color='black', linestyle='dashed')