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_ITERATIONth iteration ifDECR_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_DIRECTORYandCURRENT_INSTANCE_NAMEare at least necessary. Seemain.pyfor parameter explanations. Note thatINSTANCE_OUTPUT_DIRECTORYandCURRENT_INSTANCE_NAMEare set in the methods ofrun_algorithm.py.