self input_features [one]+dataset input_features one is defined below self weights {feat:random uniform(-max_init,max_initfor feat in self input_featurespredictor predicts the value of an example from the current parameter settings predictor string gives string representation of the predictor learnlinear py -(continued def predictor(self, )"""returns the prediction of the learner on example ""linpred sum( * (efor , in self weights items()if self squashedreturn sigmoid(linpredelsereturn linpred def predictor_string(selfsig_dig= )"""returns the doc string for the current prediction function sig_dig is the number of significant digits in the numbers""doc "+join(str(round(val,sig_dig))+"*"+feat __doc__ for feat,val in self weights items()if self squashedreturn "sigmoid("doc+")elsereturn doc learn is the main algorithm of the learner it does num iter steps of stochastic gradient descent with batch size the other parameters it gets from the class learnlinear py -(continued def learn(self,num_iter= )for it in range(num_iter)self display( ,"prediction=",self predictor_string()for in self trainpredicted self predictor(eerror predicted self target(eupdate self learning_rate*error for feat in self weightsself weights[feat-update*feat(ereturn self predictor one is function that always returns this is used for one of the input properties learnlinear py -(continued def one( )" return version june