'Return the decision path in the tree
.. versionadded:: 0.18
Parameters
X : array_like or sparse matrix, shape = [n_samples, n_features]
The input samples. Internally, it will be converted to
``dtype=np.float32`` and if a sparse matrix is provided
to a sparse ``csr_matrix``.
check_input : boolean, (default=True)
Allow to bypass several input checking.
Don\'t use this parameter unless you know what you do.
Returns
indicator : sparse csr array, shape = [n_samples, n_nodes]
Return a node indicator matrix where non zero elements
indicates that the samples goes through the nodes.'

def decision_path(self, X, check_input=True):

    X = self._validate_X_predict(X, check_input)
    return self.tree_.decision_path(X)
