#NEWLINE# def plot_log_likelihood( results , names , results_dir , outname = 'pred_ll_vs_time.pdf' ) : #NEWLINE# #INDENT# plt . figure ( figsize = ( 3 , 3.2 ) ) #NEWLINE# for ( i , ( result , name ) ) in enumerate ( zip ( results , names ) ) : #NEWLINE# #INDENT# plt . plot ( result . timestamps , result . lls , lw = 2 , color = colors [ names ] , label = name ) #NEWLINE# #UNINDENT# plt . legend ( loc = 'lower right' ) #NEWLINE# plt . xlabel ( 'Time (s)' ) #NEWLINE# plt . ylabel ( 'Log Likelihood' ) #NEWLINE# plt . savefig ( os . path . join ( results_dir , outname ) ) #NEWLINE# plt . tight_layout ( )