input_output_functions.save_and_plot_results_memory_optimised#

input_output_functions.save_and_plot_results_memory_optimised(M: ndarray, C: ndarray, final_stationary_distribution: ndarray, final_transition_matrix: ndarray, final_theta: ndarray, objective_values: ndarray, final_gradient_estimate: ndarray, ALGORITHM_PARAMETERS: dict[str, Any]) None#

Saves and creates the plots and output matrices for the memory optimised SM-SPSA.

Parameters:
  • M (np.ndarray) – The transition matrix that is optimised.

  • C (np.ndarray) – The binary adjustment matrix.

  • final_stationary_distribution (np.ndarray) – The stationary distribution at the last iteration.

  • final_transition_matrix (np.ndarray) – The transition matrix at the last iteration.

  • final_theta (np.ndarray) – The matrix in the unconstrained space at the last iteration.

  • objective_values (np.ndarray) – The objective value at each iteration or at each OBJ_EVAL_ITERATION th iteration if DECR_NR_OBJ_EVAL=True.

  • final_gradient_estimate (np.ndarray) – The gradient estimate at the last iteration.

  • ALGORITHM_PARAMETERS (dict[str, Any]) – The algorithm parameters. The parameters PLOT_OBJECTIVE, PLOT_NETWORK, NETWORK_PLOT_FILE_NAME, SAVE_OUTPUT, INSTANCE_OUTPUT_DIRECTORY and CURRENT_INSTANCE_NAME are at least necessary. See main.py for parameter explanations. Note that INSTANCE_OUTPUT_DIRECTORY and CURRENT_INSTANCE_NAME are set in the methods of run_algorithm.py.