[scikit-learn] Need Corresponding indices array of values in each split of a DesicisionTreeClassifier

2017-02-07 Thread Nixon Raj
For Example, In the below decision tree dot file, I have 223 samples which splits into [174, 49] in the first split and [110, 1] in the 2nd split I would like to get the array of indices for the values of each split like *[174, 49] and their corresponding indices (idx) like [[0, 1 ,5, 7,,200

Re: [scikit-learn] Need Corresponding indices array of values in each split of a DesicisionTreeClassifier

2017-02-07 Thread Joel Nothman
I don't think putting that array of indices in a visualisation is a great idea! If you use my_tree.apply(X) you will be able to determine which leaf each instance in X lands up at, and potentially trace up the tree from there. On 8 February 2017 at 01:26, Nixon Raj wrote: > > For Example, In th

Re: [scikit-learn] Need Corresponding indices array of values in each split of a DesicisionTreeClassifier

2017-02-07 Thread Jeff Blackburne
Nixon, If you are using version 0.18 or later, you can reconstruct the information you need using the `decision_path` method: http://scikit-learn.org/stable/auto_examples/tree/plot_unveil_tree_structure.html -Jeff On Tue, Feb 7, 2017 at 3:21 PM, Joel Nothman wrote: > I don't think putting th

Re: [scikit-learn] Preparing a scikit-learn 0.18.2 bugfix release

2017-02-07 Thread Joel Nothman
On 12 January 2017 at 08:51, Gael Varoquaux wrote: > On Thu, Jan 12, 2017 at 08:41:51AM +1100, Joel Nothman wrote: > > When the two versions deprecation policy was instituted, releases were > much > > more frequent... Is that enough of an excuse? > > I'd rather say that we can here decide that we