where nw is again the number of feature vectors in rw it is not difficult to show that gw (xyrw minimizes the squared-error loss with respect to all constant functionsin the region rw see exercise splitting rules in line in algorithm we divide region rv into two setsusing splitting rule (functionsv consequentlythe data set associated with node (that isthe subset of the original data set whose feature vectors lie in rv )is also split -into st and sf what is the benefit of such split in terms of reduction in the training lossif were set to leaf nodeits contribution to the training loss would be (see ( )) {( , )sloss(yi gv (xi ) = ( if were to be split insteadits contribution to the overall training loss would ben {( , )st loss(yi gt (xi ) {( , )sf loss(yi gf (xi )) = = ( where gt and gf are the prediction functions belonging to the child nodes vt and vf greedy heuristic is to pretend that the tree construction algorithm immediately terminates after the splitin which case vt and vf are leaf nodesand gt and gf are readily evaluated - as in section note that for any splitting rule the contribution ( is always greater than or equal to ( it therefore makes sense to choose the splitting rule such that ( is minimized moreoverthe termination criterion may involve comparing ( with ( if their difference is too small it may not be worth further splitting the feature space as an examplesuppose the feature space is and we consider splitting rules of the form ( { }( for some and rwhere we identify with false and with true due to the computational and interpretative simplicitysuch binary splitting rules are implemented in many software packages and are considered to be the de facto standard as we have seenthese rules divide up the feature space into rectanglesas in figure it is natural to ask how and should be chosen so as to minimize ( for regression problemusing squared-error loss and constant regional prediction function as in ( )the sum ( is given by yt yf ( ( , ) : ( , ) : > where yt and yf are the average responses for the st and sf datarespectively let { , }mk= denote the possible values of within the training subset (with elementsnote thatfor fixed ( is piecewise constant function of xand that its minimal value is attained at some value , as consequenceto minimize ( over all and xit suffices to evaluate ( for each of the values , and then take the minimizing pair jx ,