tutorials icon indicating copy to clipboard operation
tutorials copied to clipboard

A suggestion on is_numeric function

Open riversxiao opened this issue 6 years ago • 0 comments

Hi, Josh Gordon Thanks for your great sharing, it helped me get a much better understanding of decision tree. I have a suggestion on the function ''is_numeric'' In your example, there is no bool column in the training data, so 'is_numeric' function works fine, yet if i add a bool column in the dataset, is_numeric(True) will be true so i suggest change the function into the following to take bool value into account def is_numeric(value): return type(value) in (float,int) thanks~

riversxiao avatar May 06 '18 04:05 riversxiao