input_output_functions.save_and_plot_results#
- input_output_functions.save_and_plot_results(M: ndarray, C: ndarray, stationary_distributions: ndarray, transition_matrices: ndarray, thetas: ndarray, objective_values: ndarray, gradient_estimates: ndarray, ALGORITHM_PARAMETERS: dict[str, Any]) None #
Saves and creates the plots and output matrices for SM-SPSA.
- Parameters:
M (np.ndarray) – The transition matrix that is optimised.
C (np.ndarray) – The binary adjustment matrix.
stationary_distributions (np.ndarray) – The stationary distribution of all nodes at each iteration.
transition_matrices (np.ndarray) – The transition matrix in the stochastic matrix space at each iteration.
thetas (np.ndarray) – The matrix in the unconstrained space at each iteration.
objective_values (np.ndarray) – The objective value at each iteration.
gradient_estimates (np.ndarray) – The gradient estimate at each iteration.
ALGORITHM_PARAMETERS (dict[str, Any]) – The algorithm parameters. The parameters
PLOT_OBJECTIVE
,PLOT_MATRICES
,PLOT_NETWORK
,NETWORK_PLOT_FILE_NAME
,SAVE_OUTPUT
,INSTANCE_OUTPUT_DIRECTORY
andCURRENT_INSTANCE_NAME
are at least necessary. Seemain.py
for parameter explanations. Note thatINSTANCE_OUTPUT_DIRECTORY
andCURRENT_INSTANCE_NAME
are set in the methods ofrun_algorithm.py
.