added optional exercise to plot learning curves with randomly selected examples