8000 DOC_Standardized formatting for default values in manifold module by amy12xx · Pull Request #17518 · scikit-learn/scikit-learn · GitHub
[go: up one dir, main page]

Skip to content

DOC_Standardized formatting for default values in manifold module #17518

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 3 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 7 additions & 7 deletions sklearn/manifold/_isomap.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,13 +22,13 @@ class Isomap(TransformerMixin, BaseEstimator):

Parameters
----------
n_neighbors : integer
n_neighbors : integer, default=5
number of neighbors to consider for each point.

n_components : integer
n_components : integer, default=2
number of coordinates for the manifold

eigen_solver : ['auto'|'arpack'|'dense']
eigen_solver : ['auto'|'arpack'|'dense'], default='auto'
'auto' : Attempt to choose the most efficient solver
for the given problem.

Expand All @@ -38,15 +38,15 @@ class Isomap(TransformerMixin, BaseEstimator):
'dense' : Use a direct solver (i.e. LAPACK)
for the eigenvalue decomposition.

tol : float
tol : float, default=0
Convergence tolerance passed to arpack or lobpcg.
not used if eigen_solver == 'dense'.

max_iter : integer
max_iter : integer, default=None
Maximum number of iterations for the arpack solver.
not used if eigen_solver == 'dense'.

path_method : string ['auto'|'FW'|'D']
path_method : string ['auto'|'FW'|'D'], default='auto'
Method to use in finding shortest path.

'auto' : attempt to choose the best algorithm automatically.
Expand All @@ -55,7 +55,7 @@ class Isomap(TransformerMixin, BaseEstimator):

'D' : Dijkstra's algorithm.

neighbors_algorithm : string ['auto'|'brute'|'kd_tree'|'ball_tree']
neighbors_algorithm : string ['auto'|'brute'|'kd_tree'|'ball_tree'], default='auto'
Algorithm to use for nearest neighbors search,
passed to neighbors.NearestNeighbors instance.

Expand Down
48 changes: 24 additions & 24 deletions sklearn/manifold/_locally_linear.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ def barycenter_weights(X, Z, reg=1e-3):

Z : array-like, shape (n_samples, n_neighbors, n_dim)

reg : float, optional
reg : float, default=1e-3
amount of regularization to add for the problem to be
well-posed in the case of n_neighbors > n_dim

Expand Down Expand Up @@ -121,10 +121,10 @@ def null_space(M, k, k_skip=1, eigen_solver='arpack', tol=1E-6, max_iter=100,
k : integer
Number of eigenvalues/vectors to return

k_skip : integer, optional
k_skip : integer, default=1
Number of low eigenvalues to skip.

eigen_solver : string, {'auto', 'arpack', 'dense'}
eigen_solver : string, {'auto', 'arpack', 'dense'}, default='arpack'
auto : algorithm will attempt to choose the best method for input data
arpack : use arnoldi iteration in shift-invert mode.
For this method, M may be a dense matrix, sparse matrix,
Expand All @@ -136,11 +136,11 @@ def null_space(M, k, k_skip=1, eigen_solver='arpack', tol=1E-6, max_iter=100,
or matrix type. This method should be avoided for
large problems.

tol : float, optional
tol : float, default=1e-6
Tolerance for 'arpack' method.
Not used if eigen_solver=='dense'.

max_iter : int
max_iter : int, default=100
Maximum number of iterations for 'arpack' method.
Not used if eigen_solver=='dense'

Expand Down Expand Up @@ -205,11 +205,11 @@ def locally_linear_embedding(
n_components : integer
number of coordinates for the manifold.

reg : float
reg : float, default=1e-3
regularization constant, multiplies the trace of the local covariance
matrix of the distances.

eigen_solver : string, {'auto', 'arpack', 'dense'}
eigen_solver : string, {'auto', 'arpack', 'dense'}, default='auto'
auto : algorithm will attempt to choose the best method for input data

arpack : use arnoldi iteration in shift-invert mode.
Expand All @@ -223,14 +223,14 @@ def locally_linear_embedding(
or matrix type. This method should be avoided for
large problems.

tol : float, optional
tol : float, default=1e-6
Tolerance for 'arpack' method
Not used if eigen_solver=='dense'.

max_iter : integer
max_iter : integer, default=100
maximum number of iterations for the arpack solver.

method : {'standard', 'hessian', 'modified', 'ltsa'}
method : {'standard', 'hessian', 'modified', 'ltsa'}, default='standard'
standard : use the standard locally linear embedding algorithm.
see reference [1]_
hessian : use the Hessian eigenmap method. This method requires
Expand All @@ -241,11 +241,11 @@ def locally_linear_embedding(
ltsa : use local tangent space alignment algorithm
see reference [4]_

hessian_tol : float, optional
hessian_tol : float, default=1e-4
Tolerance for Hessian eigenmapping method.
Only used if method == 'hessian'

modified_tol : float, optional
modified_tol : float, default=1e-12
Tolerance for modified LLE method.
Only used if method == 'modified'

Expand All @@ -254,7 +254,7 @@ def locally_linear_embedding(
Pass an int for reproducible results across multiple function calls.
See :term: `Glossary <random_state>`.

n_jobs : int or None, optional (default=None)
n_jobs : int or None, default=None
The number of parallel jobs to run for neighbors search.
``None`` means 1 unless in a :obj:`joblib.parallel_backend` context.
``-1`` means using all processors. See :term:`Glossary <n_jobs>`
Expand Down Expand Up @@ -525,17 +525,17 @@ class LocallyLinearEmbedding(TransformerMixin,

Parameters
----------
n_neighbors : integer
n_neighbors : integer, default=5
number of neighbors to consider for each point.

n_components : integer
n_components : integer, default=2
number of coordinates for the manifold

reg : float
reg : float, default=1e-3
regularization constant, multiplies the trace of the local covariance
matrix of the distances.

eigen_solver : string, {'auto', 'arpack', 'dense'}
eigen_solver : string, {'auto', 'arpack', 'dense'}, default='auto'
auto : algorithm will attempt to choose the best method for input data

arpack : use arnoldi iteration in shift-invert mode.
Expand All @@ -549,15 +549,15 @@ class LocallyLinearEmbedding(TransformerMixin,
or matrix type. This method should be avoided for
large problems.

tol : float, optional
tol : float, default=1e-6
Tolerance for 'arpack' method
Not used if eigen_solver=='dense'.

max_iter : integer
max_iter : integer, default=100
maximum number of iterations for the arpack solver.
Not used if eigen_solver=='dense'.

method : string ('standard', 'hessian', 'modified' or 'ltsa')
method : string ('standard', 'hessian', 'modified' or 'ltsa'), default='standard'
standard : use the standard locally linear embedding algorithm. see
reference [1]
hessian : use the Hessian eigenmap method. This method requires
Expand All @@ -568,15 +568,15 @@ class LocallyLinearEmbedding(TransformerMixin,
ltsa : use local tangent space alignment algorithm
see reference [4]

hessian_tol : float, optional
hessian_tol : float, default=1e-4
Tolerance for Hessian eigenmapping method.
Only used if ``method == 'hessian'``

modified_tol : float, optional
modified_tol : float, default=1e-12
Tolerance for modified LLE method.
Only used if ``method == 'modified'``

neighbors_algorithm : string ['auto'|'brute'|'kd_tree'|'ball_tree']
neighbors_algorithm : string ['auto'|'brute'|'kd_tree'|'ball_tree'], default='auto'
algorithm to use for nearest neighbors search,
passed to neighbors.NearestNeighbors instance

Expand All @@ -585,7 +585,7 @@ class LocallyLinearEmbedding(TransformerMixin,
``eigen_solver`` == 'arpack'. Pass an int for reproducible results
across multiple function calls. See :term: `Glossary <random_state>`.

n_jobs : int or None, optional (default=None)
n_jobs : int or None, default=None
The number of parallel jobs to run.
``None`` means 1 unless in a :obj:`joblib.parallel_backend` context.
``-1`` means using all processors. See :term:`Glossary <n_jobs>`
Expand Down
44 changes: 22 additions & 22 deletions sklearn/manifold/_mds.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,26 +26,26 @@ def _smacof_single(dissimilarities, metric=True, n_components=2, init=None,
dissimilarities : ndarray, shape (n_samples, n_samples)
Pairwise dissimilarities between the points. Must be symmetric.

metric : boolean, optional, default: True
metric : boolean, default=True
Compute metric or nonmetric SMACOF algorithm.

n_components : int, optional, default: 2
n_components : int, default=2
Number of dimensions in which to immerse the dissimilarities. If an
``init`` array is provided, this option is overridden and the shape of
``init`` is used to determine the dimensionality of the embedding
space.

init : ndarray, shape (n_samples, n_components), optional, default: None
init : ndarray, shape (n_samples, n_components), default=None
Starting configuration of the embedding to initialize the algorithm. By
default, the algorithm is initialized with a randomly chosen array.

max_iter : int, optional, default: 300
max_iter : int, default=300
Maximum number of iterations of the SMACOF algorithm for a single run.

verbose : int, optional, default: 0
verbose : int, default=0
Level of verbosity.

eps : float, optional, default: 1e-3
eps : float, default=1e-3
Relative tolerance with respect to stress at which to declare
convergence.

Expand Down Expand Up @@ -158,26 +158,26 @@ def smacof(dissimilarities, *, metric=True, n_components=2, init=None,
dissimilarities : ndarray, shape (n_samples, n_samples)
Pairwise dissimilarities between the points. Must be symmetric.

metric : boolean, optional, default: True
metric : boolean, default=True
Compute metric or nonmetric SMACOF algorithm.

n_components : int, optional, default: 2
n_components : int, default=2
Number of dimensions in which to immerse the dissimilarities. If an
``init`` array is provided, this option is overridden and the shape of
``init`` is used to determine the dimensionality of the embedding
space.

init : ndarray, shape (n_samples, n_components), optional, default: None
init : ndarray, shape (n_samples, n_components), default=None
Starting configuration of the embedding to initialize the algorithm. By
default, the algorithm is initialized with a randomly chosen array.

n_init : int, optional, default: 8
n_init : int, default=8
Number of times the SMACOF algorithm will be run with different
initializations. The final results will be the best output of the runs,
determined by the run with the smallest final stress. If ``init`` is
provided, this option is overridden and a single run is performed.

n_jobs : int or None, optional (default=None)
n_jobs : int or None, default=None
The number of jobs to use for the computation. If multiple
initializations are used (``n_init``), each run of the algorithm is
computed in parallel.
Expand All @@ -189,10 +189,10 @@ def smacof(dissimilarities, *, metric=True, n_components=2, init=None,
max_iter : int, optional, default: 300
Maximum number of iterations of the SMACOF algorithm for a single run.

verbose : int, optional, default: 0
verbose : int, default=0
Level of verbosity.

eps : float, optional, default: 1e-3
eps : float, default=1e-3
Relative tolerance with respect to stress at which to declare
convergence.

Expand All @@ -201,7 +201,7 @@ def smacof(dissimilarities, *, metric=True, n_components=2, init=None,
Pass an int for reproducible results across multiple function calls.
See :term: `Glossary <random_state>`.

return_n_iter : bool, optional, default: False
return_n_iter : bool, default=False
Whether or not to return the number of iterations.

Returns
Expand Down Expand Up @@ -281,28 +281,28 @@ class MDS(BaseEstimator):

Parameters
----------
n_components : int, optional, default: 2
n_components : int, default=2
Number of dimensions in which to immerse the dissimilarities.

metric : boolean, optional, default: True
metric : boolean, default=True
If ``True``, perform metric MDS; otherwise, perform nonmetric MDS.

n_init : int, optional, default: 4
n_init : int, default=4
Number of times the SMACOF algorithm will be run with different
initializations. The final results will be the best output of the runs,
determined by the run with the smallest final stress.

max_iter : int, optional, default: 300
max_iter : int, default=300
Maximum number of iterations of the SMACOF algorithm for a single run.

verbose : int, optional, default: 0
verbose : int, default=0
Level of verbosity.

eps : float, optional, default: 1e-3
eps : float, default=1e-3
Relative tolerance with respect to stress at which to declare
convergence.

n_jobs : int or None, optional (default=None)
n_jobs : int or None, default=None
The number of jobs to use for the computation. If multiple
initializations are used (``n_init``), each run of the algorithm is
computed in parallel.
Expand All @@ -316,7 +316,7 @@ class MDS(BaseEstimator):
Pass an int for reproducible results across multiple function calls.
See :term: `Glossary <random_state>`.

dissimilarity : 'euclidean' | 'precomputed', optional, default: 'euclidean'
dissimilarity : 'euclidean' | 'precomputed', default='euclidean'
Dissimilarity measure to use:

- 'euclidean':
Expand Down
Loading
0