learner linear_learner(datasquashed=falselearner learning_rate= learner learn( learner learning_rate= learner learn( learner learning_rate= learner learn( learner display( ,"function learned is"learner predictor_string()"error=",data evaluate_dataset(data trainlearner predictorevaluate squared_loss)plt plot([ [ for in data train],[ [- for in data train],"bo",label="data"plt plot(list(arange(minx,maxx,step_size)),[learner predictor([ ]for in arange(minx,maxx,step_size)]label=labelplt legend(plt draw(learnlinear py -(continued from learnproblem import data_set_augmentedpower_feat def plot_polynomials(datalearner_class linear_learnermax_degree minx maxx num_iter learning_rate step_size for plotting )plt ion(plt xlabel(" "plt ylabel(" "plt plot([ [ for in data train],[ [- for in data train],"ko",label="data"x_values list(arange(minx,maxx,step_size)line_styles ['-','--','',':'colors [' ',' ',' ',' ',' 'for degree in range(max_degree)data_aug data_set_augmented(data,[power_feat(nfor in range( ,degree+ )]include_orig=falselearner learner_class(data_aug,squashed=falselearner learning_rate learning_rate learner learn(num_iterlearner display( ,"for degree",degree"function learned is"learner predictor_string()"error=",data evaluate_dataset(data trainlearner predictorevaluate squared_loss)ls line_styles[degree len(line_styles)version june