def boxplot_runtimes(runtimes, pred_type, configuration):
 (fig, ax1) = plt.subplots(figsize=(10, 6))
 bp = plt.boxplot(runtimes)
 cls_infos = [('%s\n(%d %s)' % (estimator_conf['name'], estimator_conf['complexity_computer'](estimator_conf['instance']), estimator_conf['complexity_label'])) for estimator_conf in configuration['estimators']]
 plt.setp(ax1, xticklabels=cls_infos)
 plt.setp(bp['boxes'], color='black')
 plt.setp(bp['whiskers'], color='black')
 plt.setp(bp['fliers'], color='red', marker='+')
 ax1.yaxis.grid(True, linestyle='-', which='major', color='lightgrey', alpha=0.5)
 ax1.set_axisbelow(True)
 ax1.set_title(('Prediction Time per Instance - %s, %d feats.' % (pred_type.capitalize(), configuration['n_features'])))
 ax1.set_ylabel('Prediction Time (us)')
 plt.show()

def boxplot_runtimes ( runtimes , pred_type , configuration ) : ( fig , ax1 ) = plt . subplots ( figsize = ( 10 , 6 ) ) bp = plt . boxplot ( runtimes ) cls_infos = [ ( '%s\n(%d %s)' % ( estimator_conf [ 'name' ] , estimator_conf [ 'complexity_computer' ] ( estimator_conf [ 'instance' ] ) , estimator_conf [ 'complexity_label' ] ) ) for estimator_conf in configuration [ 'estimators' ] ] plt . setp ( ax1 , xticklabels = cls_infos ) plt . setp ( bp [ 'boxes' ] , color = 'black' ) plt . setp ( bp [ 'whiskers' ] , color = 'black' ) plt . setp ( bp [ 'fliers' ] , color = 'red' , marker = '+' ) ax1 . yaxis . grid ( True , linestyle = '-' , which = 'major' , color = 'lightgrey' , alpha = 0.5 ) ax1 . set_axisbelow ( True ) ax1 . set_title ( ( 'Prediction Time per Instance - %s, %d feats.' % ( pred_type . capitalize ( ) , configuration [ 'n_features' ] ) ) ) ax1 . set_ylabel ( 'Prediction Time (us)' ) plt . show ( )
plot a new figure with boxplots of prediction runtimes .