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

Exercises

  1. Result probabilities. Currently, the classify and mdclassify functions give their results as total counts. Modify them to give the probabilities of the results being one of the categories.

  2. Missing data ranges. mdclassify allows the use of “None” to specify a missing value. For numerical values the result may not be completely unknown, but may be known to be in a range. Modify mdclassify to allow a tuple such as (20,25) in place of a value and traverse down both branches when necessary.

  3. Early stopping. Rather than pruning the tree, buildtree can just stop dividing when it reaches a point where the entropy is not reduced enough. This may not be ideal in some cases, but it does save an extra step. Modify buildtree to take a minimum gain parameter and stop dividing the branch if this condition is not met.


  

You are currently reading a PREVIEW of this book.

                                                                                                                    

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

  

Start a Free Trial


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