Skip to content

Commit b1d1703

Browse files
committed
Pushing the docs to dev/ for branch: master, commit 125a54d9440567afe77ed45f57be0fa7edaa74c3
1 parent 78368d5 commit b1d1703

File tree

1,219 files changed

+3938
-3886
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

1,219 files changed

+3938
-3886
lines changed
Binary file not shown.

dev/_downloads/76064e174f651530bf4f9c3043b45bad/approximate_nearest_neighbors.py

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4,22 +4,23 @@
44
=====================================
55
66
This example presents how to chain KNeighborsTransformer and TSNE in a
7-
pipeline, and how to wrap the packages `annoy` and `nmslib` to replace
8-
KNeighborsTransformer and perform approximate nearest neighbors.
9-
These package can be installed with `pip install annoy nmslib`.
7+
pipeline. It also shows how to wrap the packages `annoy` and `nmslib` to
8+
replace KNeighborsTransformer and perform approximate nearest neighbors.
9+
These packages can be installed with `pip install annoy nmslib`.
1010
11-
Note: Currently TSNE(metric='precomputed') does not modify the precomputed
11+
Note: Currently `TSNE(metric='precomputed')` does not modify the precomputed
1212
distances, and thus assumes that precomputed euclidean distances are squared.
1313
In future versions, a parameter in TSNE will control the optional squaring of
1414
precomputed distances (see #12401).
1515
16-
Note: In :class:`KNeighborsTransformer` we use the definition which includes
17-
each training point as its own neighbor in the count of `n_neighbors`, and for
16+
Note: In KNeighborsTransformer we use the definition which includes each
17+
training point as its own neighbor in the count of `n_neighbors`, and for
1818
compatibility reasons, one extra neighbor is computed when
1919
`mode == 'distance'`. Please note that we do the same in the proposed wrappers.
2020
2121
Sample output:
2222
23+
```
2324
Benchmarking on MNIST_2000:
2425
---------------------------
2526
AnnoyTransformer: 0.583 sec
@@ -39,6 +40,7 @@
3940
TSNE with NMSlibTransformer: 43.295 sec
4041
TSNE with KNeighborsTransformer: 64.845 sec
4142
TSNE with internal NearestNeighbors: 64.984 sec
43+
```
4244
"""
4345
# Author: Tom Dupre la Tour
4446
#

dev/_downloads/8beb8fb5e0db15c9c745e5d2e6e5c677/approximate_nearest_neighbors.ipynb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
"cell_type": "markdown",
1616
"metadata": {},
1717
"source": [
18-
"\n# Approximate nearest neighbors in TSNE\n\n\nThis example presents how to chain KNeighborsTransformer and TSNE in a\npipeline, and how to wrap the packages `annoy` and `nmslib` to replace\nKNeighborsTransformer and perform approximate nearest neighbors.\nThese package can be installed with `pip install annoy nmslib`.\n\nNote: Currently TSNE(metric='precomputed') does not modify the precomputed\ndistances, and thus assumes that precomputed euclidean distances are squared.\nIn future versions, a parameter in TSNE will control the optional squaring of\nprecomputed distances (see #12401).\n\nNote: In :class:`KNeighborsTransformer` we use the definition which includes\neach training point as its own neighbor in the count of `n_neighbors`, and for\ncompatibility reasons, one extra neighbor is computed when\n`mode == 'distance'`. Please note that we do the same in the proposed wrappers.\n\nSample output:\n\nBenchmarking on MNIST_2000:\n---------------------------\nAnnoyTransformer: 0.583 sec\nNMSlibTransformer: 0.321 sec\nKNeighborsTransformer: 1.225 sec\nTSNE with AnnoyTransformer: 4.903 sec\nTSNE with NMSlibTransformer: 5.009 sec\nTSNE with KNeighborsTransformer: 6.210 sec\nTSNE with internal NearestNeighbors: 6.365 sec\n\nBenchmarking on MNIST_10000:\n----------------------------\nAnnoyTransformer: 4.457 sec\nNMSlibTransformer: 2.080 sec\nKNeighborsTransformer: 30.680 sec\nTSNE with AnnoyTransformer: 30.225 sec\nTSNE with NMSlibTransformer: 43.295 sec\nTSNE with KNeighborsTransformer: 64.845 sec\nTSNE with internal NearestNeighbors: 64.984 sec\n"
18+
"\n# Approximate nearest neighbors in TSNE\n\n\nThis example presents how to chain KNeighborsTransformer and TSNE in a\npipeline. It also shows how to wrap the packages `annoy` and `nmslib` to\nreplace KNeighborsTransformer and perform approximate nearest neighbors.\nThese packages can be installed with `pip install annoy nmslib`.\n\nNote: Currently `TSNE(metric='precomputed')` does not modify the precomputed\ndistances, and thus assumes that precomputed euclidean distances are squared.\nIn future versions, a parameter in TSNE will control the optional squaring of\nprecomputed distances (see #12401).\n\nNote: In KNeighborsTransformer we use the definition which includes each\ntraining point as its own neighbor in the count of `n_neighbors`, and for\ncompatibility reasons, one extra neighbor is computed when\n`mode == 'distance'`. Please note that we do the same in the proposed wrappers.\n\nSample output:\n\n```\nBenchmarking on MNIST_2000:\n---------------------------\nAnnoyTransformer: 0.583 sec\nNMSlibTransformer: 0.321 sec\nKNeighborsTransformer: 1.225 sec\nTSNE with AnnoyTransformer: 4.903 sec\nTSNE with NMSlibTransformer: 5.009 sec\nTSNE with KNeighborsTransformer: 6.210 sec\nTSNE with internal NearestNeighbors: 6.365 sec\n\nBenchmarking on MNIST_10000:\n----------------------------\nAnnoyTransformer: 4.457 sec\nNMSlibTransformer: 2.080 sec\nKNeighborsTransformer: 30.680 sec\nTSNE with AnnoyTransformer: 30.225 sec\nTSNE with NMSlibTransformer: 43.295 sec\nTSNE with KNeighborsTransformer: 64.845 sec\nTSNE with internal NearestNeighbors: 64.984 sec\n```\n"
1919
]
2020
},
2121
{
Binary file not shown.

dev/_downloads/scikit-learn-docs.pdf

19.2 KB
Binary file not shown.

dev/_images/iris.png

0 Bytes
377 Bytes
377 Bytes
-290 Bytes
-290 Bytes

0 commit comments

Comments
 (0)