From fdb42ea4d7d7fd02f256ca8f91dc0a2a2b34cd1e Mon Sep 17 00:00:00 2001
From: Daniel Galvez
Date: Wed, 7 Jan 2015 21:55:23 -0500
Subject: [PATCH] Added indentation to docstring
---
sklearn/tree/tree.py | 20 ++++++++++----------
1 file changed, 10 insertions(+), 10 deletions(-)
diff --git a/sklearn/tree/tree.py b/sklearn/tree/tree.py
index 7e369e62245..917ec5e73ea 100644
--- a/sklearn/tree/tree.py
+++ b/sklearn/tree/tree.py
@@ -389,18 +389,18 @@ class BaseDecisionTree(six.with_metaclass(ABCMeta, BaseEstimator,
return self.tree_.compute_feature_importances()
def apply(self, X):
- """
- Returns the index of the leaf that each sample is predicted as.
+ """
+ Returns the index of the leaf that each sample is predicted as.
- Parameters
- ----------
- X: array_like, shape = (n_samples, n_features)
- Input Samples
+ Parameters
+ ----------
+ X: array_like, shape = (n_samples, n_features)
+ Input Samples
- Returns
- -------
- X_leaves: array_like, shape = (n_samples,)
- """
+ Returns
+ -------
+ X_leaves: array_like, shape = (n_samples,)
+ """
X = check_array(X, dtype= DTYPE, accept_sparse="csr")
return self.tree_.apply(X)