From 7f4d279dc3f679efd1900385919a3e34d83f2680 Mon Sep 17 00:00:00 2001 From: Preston Parry <ClimbsBytes@gmail.com> Date: Sun, 28 Aug 2016 10:23:05 -0700 Subject: [PATCH] Minor docstring clarification (#6926) --- sklearn/ensemble/forest.py | 42 +++++++++++++-------------- sklearn/ensemble/gradient_boosting.py | 12 ++++---- 2 files changed, 27 insertions(+), 27 deletions(-) diff --git a/sklearn/ensemble/forest.py b/sklearn/ensemble/forest.py index 65522064df..4d4f04bc12 100644 --- a/sklearn/ensemble/forest.py +++ b/sklearn/ensemble/forest.py @@ -160,9 +160,9 @@ class BaseForest(six.with_metaclass(ABCMeta, BaseEnsemble, 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``. + The input samples. Internally, its dtype will be converted to + ``dtype=np.float32``. If a sparse matrix is provided, it will be + converted into a sparse ``csr_matrix``. Returns ------- @@ -184,9 +184,9 @@ class BaseForest(six.with_metaclass(ABCMeta, BaseEnsemble, 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``. + The input samples. Internally, its dtype will be converted to + ``dtype=np.float32``. If a sparse matrix is provided, it will be + converted into a sparse ``csr_matrix``. Returns ------- @@ -217,9 +217,9 @@ class BaseForest(six.with_metaclass(ABCMeta, BaseEnsemble, Parameters ---------- X : array-like or sparse matrix of shape = [n_samples, n_features] - The training input samples. Internally, it will be converted to - ``dtype=np.float32`` and if a sparse matrix is provided - to a sparse ``csc_matrix``. + The training input samples. Internally, its dtype will be converted to + ``dtype=np.float32``. If a sparse matrix is provided, it will be + converted into a sparse ``csc_matrix``. y : array-like, shape = [n_samples] or [n_samples, n_outputs] The target values (class labels in classification, real numbers in @@ -516,9 +516,9 @@ class ForestClassifier(six.with_metaclass(ABCMeta, BaseForest, Parameters ---------- X : array-like or sparse matrix of 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``. + The input samples. Internally, its dtype will be converted to + ``dtype=np.float32``. If a sparse matrix is provided, it will be + converted into a sparse ``csr_matrix``. Returns ------- @@ -552,9 +552,9 @@ class ForestClassifier(six.with_metaclass(ABCMeta, BaseForest, Parameters ---------- X : array-like or sparse matrix of 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``. + The input samples. Internally, its dtype will be converted to + ``dtype=np.float32``. If a sparse matrix is provided, it will be + converted into a sparse ``csr_matrix``. Returns ------- @@ -605,9 +605,9 @@ class ForestClassifier(six.with_metaclass(ABCMeta, BaseForest, Parameters ---------- X : array-like or sparse matrix of 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``. + The input samples. Internally, its dtype will be converted to + ``dtype=np.float32``. If a sparse matrix is provided, it will be + converted into a sparse ``csr_matrix``. Returns ------- @@ -666,9 +666,9 @@ class ForestRegressor(six.with_metaclass(ABCMeta, BaseForest, RegressorMixin)): Parameters ---------- X : array-like or sparse matrix of 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``. + The input samples. Internally, its dtype will be converted to + ``dtype=np.float32``. If a sparse matrix is provided, it will be + converted into a sparse ``csr_matrix``. Returns ------- diff --git a/sklearn/ensemble/gradient_boosting.py b/sklearn/ensemble/gradient_boosting.py index 02e3765cfc..4ea8ef8e4e 100644 --- a/sklearn/ensemble/gradient_boosting.py +++ b/sklearn/ensemble/gradient_boosting.py @@ -1234,9 +1234,9 @@ class BaseGradientBoosting(six.with_metaclass(ABCMeta, BaseEnsemble, 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``. + The input samples. Internally, its dtype will be converted to + ``dtype=np.float32``. If a sparse matrix is provided, it will + be converted to a sparse ``csr_matrix``. Returns ------- @@ -1865,9 +1865,9 @@ class GradientBoostingRegressor(BaseGradientBoosting, RegressorMixin): 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``. + The input samples. Internally, its dtype will be converted to + ``dtype=np.float32``. If a sparse matrix is provided, it will + be converted to a sparse ``csr_matrix``. Returns ------- -- GitLab