Skip to content

Commit ab1e572

Browse files
committed
Added release notes
1 parent a4cc2a2 commit ab1e572

File tree

1 file changed

+56
-0
lines changed

1 file changed

+56
-0
lines changed

docs/source/releases/v0.1.6.rst

Lines changed: 56 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
1+
====================
2+
vO.1.5 Release Notes
3+
====================
4+
5+
This release focuses on several BlueGraph's dependecy issue, implements several bugfixes and adds new features to the :code:`bluegraph.downstream.similarity` module.
6+
7+
Downstream tasks
8+
================
9+
10+
11+
Similarity search
12+
----------------
13+
14+
Added new similarity metrics for similarity indices:
15+
16+
- Wasserstein distance
17+
- Kullback–Leibler divergence
18+
19+
These metrics can be used with `ScikitLearnSimilarityIndex` (based on ball-trees). The following snippets of code illustrate the usage of new metrics.
20+
21+
22+
.. code-block:: python
23+
24+
from bluegraph.downstream.similarity import ScikitLearnSimilarityIndex, SimilarityProcessor
25+
26+
vectors = [
27+
[0, 0, 1],
28+
[1, 0, 0],
29+
[0, 1, 1]
30+
]
31+
32+
ws_index = ScikitLearnSimilarityIndex(
33+
dimension=3,
34+
similarity="wasserstein",
35+
initial_vectors=vectors)
36+
37+
distances, indices = ws_index.search([[1, 1, 0]], k=1)
38+
closest_vectors = ws_index.reconstruct(indices)
39+
40+
>>> closest_vectors
41+
array([[[1., 0., 0.]]])
42+
43+
The following code illustrates the usage of the Kullback–Leibler divergence:
44+
45+
.. code-block:: python
46+
kl_index = ScikitLearnSimilarityIndex(
47+
dimension=3,
48+
similarity="kl",
49+
initial_vectors=vectors)
50+
51+
distances, indices = kl_index.search([[1, 1, 0]], k=1)
52+
closest_vectors = kl_index.reconstruct(indices)
53+
54+
>>> closest_vectors
55+
array([[[0., 0., 1.]]])
56+

0 commit comments

Comments
 (0)