#NEWLINE# def learning_curve( scores ) : #NEWLINE# #INDENT# sc = pd . Series ( scores ) #NEWLINE# ma = pd . rolling_mean ( sc , window = 500 ) #NEWLINE# ax = plt . subplot ( 1 , 1 , 1 ) #NEWLINE# ax . plot ( ma . index , sc , color = 'lightgray' ) #NEWLINE# ax . plot ( ma . index , ma , color = 'red' ) #NEWLINE# ax . set_yscale ( 'log' ) #NEWLINE# ax . set_xlim ( sc . index . min ( ) , sc . index . max ( ) ) #NEWLINE# plt . show ( )