1

I have been looking at scikit-learn and have been trying to work out how to output an array or a dictionary of the cut points for each level of a decision tree. I can see how to generate an image of the tree but I am looking to use these cut points for further feature engineering.

user1253493
  • 67
  • 1
  • 7
  • I suggest you read the source code: https://github.com/scikit-learn/scikit-learn/blob/master/sklearn/tree/export.py – HYRY Dec 16 '14 at 22:55
  • Thank you - I have been trying to understand the documentation to no end and wouldn't have thought of that. – user1253493 Dec 17 '14 at 12:16
  • 1
    Looks like what you are asking about is rules. There are discussions about extracting rules from decision tree here:https://stackoverflow.com/questions/20224526/how-to-extract-the-decision-rules-from-scikit-learn-decision-tree . The cut-off points are available under model.tree_.threshold – Regi Mathew Jun 30 '18 at 14:28

0 Answers0