supervised machine learning data data_from_file('data/spect csv',target_index= seed= plot_error(datawarningmay take long time depending on the dataset #also trydata data_from_file('data/mail_reading csv'target_index=- data data_from_file('data/carbool csv'target_index=- seed= plot_error(datacriterion=evaluate log_lossleaf_prediction=predict laplacewarningmay take long time depending on the dataset note that different runs for the same data will have the same test errorbut different validation error if you rerun the data_from_fileyou will get the new test and training setsand so the graph will change exercise change the error plot so that it can evaluate the stopping criteria of the exercise of section which criteria makes the most difference linear regression and classification here we give gradient descent searcher for linear regression and classification learnlinear py -linear regression and classification from learnproblem import learner import randommath class linear_learner(learner)def __init__(selfdatasettrain=nonelearning_rate= max_init squashed=true)"""creates gradient descent searcher for linear classifier the main learning is carried out by learn( dataset provides the target and the input features train provides subset of the training data to use number_iterations is the default number of steps of gradient descent learning_rate is the gradient descent step size max_init is the maximum absolute value of the initial weights squashed specifies whether the output is squashed linear function ""self dataset dataset self target dataset target if train==noneself train self dataset train elseself train train self learning_rate learning_rate self squashed squashed version june