is there any way to get samples under each leaf of a decision tree?

Viewed 5114

I have trained a decision tree using a dataset. Now I want to see which samples fall under which leaf of the tree.

From here I want the red circled samples.

enter image description here

I am using Python's Sklearn's implementation of decision tree .

1 Answers
Related