From 7612eea81eb4c1ff626dd43a2784f1a0deca6097 Mon Sep 17 00:00:00 2001 From: maikia Date: Fri, 2 Sep 2022 14:15:50 +0200 Subject: [PATCH] correct docstring --- sklearn/manifold/_locally_linear.py | 14 +++++++------- sklearn/tests/test_docstrings.py | 1 - 2 files changed, 7 insertions(+), 8 deletions(-) diff --git a/sklearn/manifold/_locally_linear.py b/sklearn/manifold/_locally_linear.py index a1c70950a9fd0..1c4d79feefdec 100644 --- a/sklearn/manifold/_locally_linear.py +++ b/sklearn/manifold/_locally_linear.py @@ -42,7 +42,7 @@ def barycenter_weights(X, Y, indices, reg=1e-3): Indices of the points in Y used to compute the barycenter reg : float, default=1e-3 - amount of regularization to add for the problem to be + Amount of regularization to add for the problem to be well-posed in the case of n_neighbors > n_dim Returns @@ -224,13 +224,13 @@ def locally_linear_embedding( numpy array or a NearestNeighbors object. n_neighbors : int - number of neighbors to consider for each point. + Number of neighbors to consider for each point. n_components : int - number of coordinates for the manifold. + Number of coordinates for the manifold. reg : float, default=1e-3 - regularization constant, multiplies the trace of the local covariance + Regularization constant, multiplies the trace of the local covariance matrix of the distances. eigen_solver : {'auto', 'arpack', 'dense'}, default='auto' @@ -252,7 +252,7 @@ def locally_linear_embedding( Not used if eigen_solver=='dense'. max_iter : int, default=100 - maximum number of iterations for the arpack solver. + Maximum number of iterations for the arpack solver. method : {'standard', 'hessian', 'modified', 'ltsa'}, default='standard' standard : use the standard locally linear embedding algorithm. @@ -267,11 +267,11 @@ def locally_linear_embedding( hessian_tol : float, default=1e-4 Tolerance for Hessian eigenmapping method. - Only used if method == 'hessian' + Only used if method == 'hessian'. modified_tol : float, default=1e-12 Tolerance for modified LLE method. - Only used if method == 'modified' + Only used if method == 'modified'. random_state : int, RandomState instance, default=None Determines the random number generator when ``solver`` == 'arpack'. diff --git a/sklearn/tests/test_docstrings.py b/sklearn/tests/test_docstrings.py index e1385f6953bdf..da5c6f9cf42d3 100644 --- a/sklearn/tests/test_docstrings.py +++ b/sklearn/tests/test_docstrings.py @@ -16,7 +16,6 @@ "sklearn.externals._packaging.version.parse", "sklearn.inspection._plot.partial_dependence.plot_partial_dependence", "sklearn.linear_model._omp.orthogonal_mp_gram", - "sklearn.manifold._locally_linear.locally_linear_embedding", "sklearn.manifold._t_sne.trustworthiness", "sklearn.metrics._plot.det_curve.plot_det_curve", "sklearn.metrics._plot.precision_recall_curve.plot_precision_recall_curve",