Free Trial

Safari Books Online is a digital library providing on-demand subscription access to thousands of learning resources.

  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint
Share this Page URL
Help

Chapter 9. Tree-based regression > Example: comparing tree methods to standard ...

9.6. Example: comparing tree methods to standard regression

Now that you can create model trees and regression trees and do regular regression, let’s test them to see which one is the best. We’re going to first write a few quick functions to give us a forecast for any given input once we have a tree. Next, we’re going to use this to calculate the test error for three different regression models. We’ll test these models on some data relating a person’s intelligence with the number of speeds on their bicycle.

The data is nonlinear and can’t be easily modeled by a global linear model from chapter 8. Also, the data used in this example is purely fictional.


  

You are currently reading a PREVIEW of this book.

                                                                                                                    

Get instant access to over $1 million worth of books and videos.

  

Start a Free 10-Day Trial


  
  • Safari Books Online
  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint