Skip to content
This repository was archived by the owner on Jan 8, 2019. It is now read-only.

Commit 97b90fb

Browse files
committed
Merge pull request scikit-learn#6698 from ixjlyons/fix-neighbor-docs
[DOC] clarify distance mode in graph creation functions.
2 parents 251fc91 + c0cb2bf commit 97b90fb

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

sklearn/neighbors/graph.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -49,9 +49,9 @@ def kneighbors_graph(X, n_neighbors, mode='connectivity', metric='minkowski',
4949
Number of neighbors for each sample.
5050
5151
mode : {'connectivity', 'distance'}, optional
52-
Type of returned matrix: 'connectivity' will return the
53-
connectivity matrix with ones and zeros, in 'distance' the
54-
edges are Euclidean distance between points.
52+
Type of returned matrix: 'connectivity' will return the connectivity
53+
matrix with ones and zeros, and 'distance' will return the distances
54+
between neighbors according to the given metric.
5555
5656
metric : string, default 'minkowski'
5757
The distance metric used to calculate the k-Neighbors for each sample
@@ -124,9 +124,9 @@ def radius_neighbors_graph(X, radius, mode='connectivity', metric='minkowski',
124124
Radius of neighborhoods.
125125
126126
mode : {'connectivity', 'distance'}, optional
127-
Type of returned matrix: 'connectivity' will return the
128-
connectivity matrix with ones and zeros, in 'distance' the
129-
edges are Euclidean distance between points.
127+
Type of returned matrix: 'connectivity' will return the connectivity
128+
matrix with ones and zeros, and 'distance' will return the distances
129+
between neighbors according to the given metric.
130130
131131
metric : string, default 'minkowski'
132132
The distance metric used to calculate the neighbors within a

0 commit comments

Comments
 (0)