def validate_average_best_span():
N = <NUM_LIT:200><EOL>num_trials = <NUM_LIT><EOL>avg = numpy.zeros(N)<EOL>for i in range(num_trials):<EOL><INDENT>x, y = smoother_friedman82.build_sample_smoother_problem_friedman82(N=N)<EOL>my_smoother = smoother.perform_smooth(<EOL>x, y, smoother_cls=supersmoother.SuperSmoother<EOL>)<EOL>avg += my_smoother._smoothed_best_spans.smooth_result<EOL>if not (i + <NUM_LIT:1>) % <NUM_LIT:20>:<EOL><INDENT>print(i + <NUM_LIT:1>)<EOL><DEDENT><DEDENT>avg /= num_trials<EOL>plt.plot(my_smoother.x, avg, '<STR_LIT:.>', label='<STR_LIT>')<EOL>finish_plot()<EOL>
Figure 2d? from Friedman.