2323
2424
2525def _graph_connected_component (graph , node_id ):
26- """Find the largest graph connected components the contains one
26+ """Find the largest graph connected components that contains one
2727 given node
2828
2929 Parameters
@@ -38,8 +38,8 @@ def _graph_connected_component(graph, node_id):
3838 Returns
3939 -------
4040 connected_components_matrix : array-like, shape: (n_samples,)
41- An array of bool value indicates the indexes of the nodes
42- belong to the largest connected components of the given query
41+ An array of bool value indicating the indexes of the nodes
42+ belonging to the largest connected components of the given query
4343 node
4444 """
4545 connected_components_matrix = np .zeros (
@@ -121,11 +121,11 @@ def _set_diag(laplacian, value):
121121def spectral_embedding (adjacency , n_components = 8 , eigen_solver = None ,
122122 random_state = None , eigen_tol = 0.0 ,
123123 norm_laplacian = True , drop_first = True ):
124- """Project the sample on the first eigen vectors of the graph Laplacian.
124+ """Project the sample on the first eigenvectors of the graph Laplacian.
125125
126126 The adjacency matrix is used to compute a normalized graph Laplacian
127- whose spectrum (especially the eigen vectors associated to the
128- smallest eigen values ) has an interpretation in terms of minimal
127+ whose spectrum (especially the eigenvectors associated to the
128+ smallest eigenvalues ) has an interpretation in terms of minimal
129129 number of cuts necessary to split the graph into comparably sized
130130 components.
131131
@@ -135,7 +135,7 @@ def spectral_embedding(adjacency, n_components=8, eigen_solver=None,
135135 heat kernel of a euclidean distance matrix or a k-NN matrix).
136136
137137 However care must taken to always make the affinity matrix symmetric
138- so that the eigen vector decomposition works as expected.
138+ so that the eigenvector decomposition works as expected.
139139
140140 Parameters
141141 ----------
@@ -152,7 +152,7 @@ def spectral_embedding(adjacency, n_components=8, eigen_solver=None,
152152
153153 random_state : int seed, RandomState instance, or None (default)
154154 A pseudo random number generator used for the initialization of the
155- lobpcg eigen vectors decomposition when eigen_solver == 'amg'.
155+ lobpcg eigenvectors decomposition when eigen_solver == 'amg'.
156156 By default, arpack is used.
157157
158158 eigen_tol : float, optional, default=0.0
@@ -326,7 +326,7 @@ class SpectralEmbedding(BaseEstimator):
326326
327327 random_state : int seed, RandomState instance, or None, default : None
328328 A pseudo random number generator used for the initialization of the
329- lobpcg eigen vectors decomposition when eigen_solver == 'amg'.
329+ lobpcg eigenvectors decomposition when eigen_solver == 'amg'.
330330
331331 affinity : string or callable, default : "nearest_neighbors"
332332 How to construct the affinity matrix.
@@ -383,11 +383,11 @@ def _pairwise(self):
383383 return self .affinity == "precomputed"
384384
385385 def _get_affinity_matrix (self , X , Y = None ):
386- """Caclulate the affinity matrix from data
386+ """Calculate the affinity matrix from data
387387 Parameters
388388 ----------
389389 X : array-like, shape (n_samples, n_features)
390- Training vector, where n_samples in the number of samples
390+ Training vector, where n_samples is the number of samples
391391 and n_features is the number of features.
392392
393393 If affinity is "precomputed"
@@ -432,7 +432,7 @@ def fit(self, X, y=None):
432432 Parameters
433433 ----------
434434 X : array-like, shape (n_samples, n_features)
435- Training vector, where n_samples in the number of samples
435+ Training vector, where n_samples is the number of samples
436436 and n_features is the number of features.
437437
438438 If affinity is "precomputed"
@@ -469,7 +469,7 @@ def fit_transform(self, X, y=None):
469469 Parameters
470470 ----------
471471 X: array-like, shape (n_samples, n_features)
472- Training vector, where n_samples in the number of samples
472+ Training vector, where n_samples is the number of samples
473473 and n_features is the number of features.
474474
475475 If affinity is "precomputed"
0 commit comments