Saturday, 28 February 2015

Review 2.5: Modeling with Decision Trees - Deal with Missing Values

Another greate feature of Decision Trees is that we can use them to handle missing values easily. For instance, what should we do if a customer's location cannot be determined from his ip address? Actually, we can check both branches of a node when a given item cannot provide information required by this node. Here is the code:

The difference between 'mdclassify' and 'classify' method is that the 'mdclassify' method can go both branches and combine the result if required information cannot be provided. 

No comments:

Post a Comment