In this code, you can use your data to train the model.I added regularization term to the program so that you can use it by the given parameter lambda.
This thesis explores different aspects of the induction of tree-based regression models from data. The main goal of this study is to improve the predictive accuracy of regression trees,while retaining as much as possible their comprehensibility and