input_output_functions.py#

This file contains some helper functions for handling input and output.

print_parameters(ALGORITHM_PARAMETERS, M, C)

Prints the algorithm parameters.

save_input_parameters(ALGORITHM_PARAMETERS)

Saves the algorithm parameters in a text file.

check_input_parameters(ALGORITHM_PARAMETERS)

Checks the algorithm parameters for invalid input parameters.

check_input_run_multiple_instances(...)

Checks the algorithm parameters for invalid input parameters if multiple instances are run.

save_and_plot_results_memory_optimised(M, C, ...)

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

save_and_plot_results(M, C, ...)

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

check_stochasticity_input_matrix(...)

Checks whether the initial transition matrix is stochastic or not.

check_final_output(final_transition_matrix, ...)

Checks whether the optimised transition matrix and corresponding stationary distribution are valid.