physbo.search.discrete.results module

class physbo.search.discrete.results.history[source]

Bases: object

export_all_sequence_best_fx()[source]
Export all fx and actions at each sequence.

(The total number of data is total_num_research.)

Returns:

  • best_fx (numpy.ndarray)

  • best_actions (numpy.ndarray)

export_sequence_best_fx()[source]

Export fx and actions at each sequence. (The total number of data is num_runs.)

Returns:

  • best_fx (numpy.ndarray)

  • best_actions (numpy.ndarray)

load(filename)[source]

Load the information of the history.

Parameters:

filename (str) – The name of the file which stores the information of the history

save(filename)[source]

Save the information of the history.

Parameters:

filename (str) – The name of the file which stores the information of the history

property time_get_action
property time_run_simulator
property time_total
property time_update_predictor
write(t, action, time_total=None, time_update_predictor=None, time_get_action=None, time_run_simulator=None)[source]

Overwrite fx and chosen_actions by t and action.

Parameters:
  • t (numpy.ndarray) – N dimensional array. The negative energy of each search candidate (value of the objective function to be optimized).

  • action (numpy.ndarray) – N dimensional array. The indexes of actions of each search candidate.

  • time_total (numpy.ndarray) – N dimenstional array. The total elapsed time in each step. If None (default), filled by 0.0.

  • time_update_predictor (numpy.ndarray) – N dimenstional array. The elapsed time for updating predictor (e.g., learning hyperparemters) in each step. If None (default), filled by 0.0.

  • time_get_action (numpy.ndarray) – N dimenstional array. The elapsed time for getting next action in each step. If None (default), filled by 0.0.

  • time_run_simulator (numpy.ndarray) – N dimenstional array. The elapsed time for running the simulator in each step. If None (default), filled by 0.0.