def train_and_plot_SFO_variations(num_passes=51, base_fname='convergence_variations'):
    """
    Same as train_and_plot(), but compares different variations of SFO to each
    other, rather than SFO to other optimizers.
    """
    base_fname += "_%s_"%(datetime.datetime.now().strftime("%Y%m%d-%H%M%S"))
    generate_data_SFO_variations(num_passes=num_passes, base_fname=base_fname)
    history_nested, num_subfunctions, full_objective_period = convergence_utils.load_results(base_fname=base_fname)
    convergence_utils.make_plots(history_nested, num_subfunctions, full_objective_period, name_prefix='variations_')
Exemple #2
0
def train_and_plot_SFO_N(num_passes=51, base_fname='num_history'):
    """
    Same as train_and_plot(), but compares SFO with different numbers of minibatches
    rather than SFO to other optimizers.
    """
    base_fname += "_%s_"%(datetime.datetime.now().strftime("%Y%m%d-%H%M%S"))
    generate_data_SFO_N(num_passes=num_passes, base_fname=base_fname)
    history_nested, num_subfunctions, full_objective_period = convergence_utils.load_results(base_fname=base_fname)
    convergence_utils.make_plots(history_nested, num_subfunctions, full_objective_period, name_prefix='num_history_')
def train_and_plot(num_passes=51, base_fname='convergence'):
    """
    Train all the models.  Save the function value and parameter settings from
    convergence.  Reload the resutls, plot them, and save the plots.

    Note that plots can be generated from previously saved histories, using load_results.
    To change the models to train and the optimizers to use
    """
    base_fname += "_%s_"%(datetime.datetime.now().strftime("%Y%m%d-%H%M%S"))
    generate_data(num_passes=num_passes, base_fname=base_fname)
    history_nested, num_subfunctions, full_objective_period = convergence_utils.load_results(base_fname=base_fname)
    convergence_utils.make_plots(history_nested, num_subfunctions, full_objective_period)
def train_and_plot(num_passes=51, base_fname='convergence'):
    """
    Train all the models.  Save the function value and parameter settings from
    convergence.  Reload the resutls, plot them, and save the plots.

    Note that plots can be generated from previously saved histories, using load_results.
    To change the models to train and the optimizers to use
    """
    base_fname += "_%s_" % (datetime.datetime.now().strftime("%Y%m%d-%H%M%S"))
    generate_data(num_passes=num_passes, base_fname=base_fname)
    history_nested, num_subfunctions, full_objective_period = convergence_utils.load_results(
        base_fname=base_fname)
    convergence_utils.make_plots(history_nested, num_subfunctions,
                                 full_objective_period)
def train_and_plot_SFO_variations(num_passes=51,
                                  base_fname='convergence_variations'):
    """
    Same as train_and_plot(), but compares different variations of SFO to each
    other, rather than SFO to other optimizers.
    """
    base_fname += "_%s_" % (datetime.datetime.now().strftime("%Y%m%d-%H%M%S"))
    generate_data_SFO_variations(num_passes=num_passes, base_fname=base_fname)
    history_nested, num_subfunctions, full_objective_period = convergence_utils.load_results(
        base_fname=base_fname)
    convergence_utils.make_plots(history_nested,
                                 num_subfunctions,
                                 full_objective_period,
                                 name_prefix='variations_')