Code
%load_ext lab_black
%load_ext autotime
import numpy as np
import pandas as pdtime: 1.86 ms (started: 2023-07-23 14:48:23 -07:00)
time: 1.86 ms (started: 2023-07-23 14:48:23 -07:00)
In terms of distances in the ambient and embedded space, how do methods that are successful at uncovering clusters in high-dimensional data (e.g. UMAP, t-SNE) differ from methods like PCA?
Some more specific questions:
To answer those questions here are some functions to:
The results below are for embedded into 2D. I do not show the actual results of the embedding.
from dataclasses import dataclass
import matplotlib.pyplot as plt
import seaborn as sns
import drnb.embed.pipeline as pl
from drnb.io.dataset import read_data
from drnb.neighbors import calculate_neighbors
from drnb.neighbors.distances import neighbor_distances
from drnb.neighbors.hubness import describe
from drnb.neighbors.nbrinfo import NearestNeighbors
from drnb.neighbors.random import random_neighbors
from drnb.plot import sns_embed_plot
def dof_nbrs(name):
dnbrs = data_nbrs(name)
for dof in [2, 1, 0.5]:
dnbrs.embed("leopold", params=dict(dof=dof), name=f"leo{dof}")
dnbrs.embed("pca")
dnbrs.dhist("ambient", "pca", "leo2", "leo1", "leo0.5", sharex=False)
dnbrs.embed_plot("leo0.5")
return dnbrs
def data_nbrs(name):
data = read_data(name)
return DataNeighbors(data, data_name=name)
def embed_nbrs(data, method, params, ambient_nbrs):
embedded = pl.embed(data, method=method, params=params)
ennd = neighbor_distances(
embedded, ambient_nbrs.near.idx, distance="euclidean"
).ravel()
ernnd = neighbor_distances(
embedded, ambient_nbrs.random.idx, distance="euclidean"
).ravel()
return ennd, ernnd, embedded
def init_fig(num_rows, figsize=None, title=None, sharex=False, sharey=False):
if figsize is None:
figsize = (10, 4)
figure, axes = plt.subplots(
num_rows,
2,
figsize=(figsize[0], figsize[1] * num_rows),
sharex=sharex,
sharey=sharey,
layout="constrained",
)
if title is not None:
figure.suptitle(title)
if num_rows == 1:
axes = axes.reshape((1, axes.shape[0]))
return figure, axes
def norm_reqs(*plot_reqs):
# make sure all args are of the form (DataNeighbor, [method_name...])
nreqs = []
for req in plot_reqs:
if isinstance(req[1], str):
nreqs.append((req[0], [req[1]]))
else:
nreqs.append(req)
return nreqs
def show(*plot_reqs, title=None, figsize=None, sharex=False):
nreqs = norm_reqs(*plot_reqs)
num_rows = sum(len(req[1]) for req in nreqs)
_, axes = init_fig(num_rows=num_rows, title=title, figsize=figsize, sharex=sharex)
i = 0
for data_nbr, methods in nreqs:
data_nbr.dhist(*methods, axes=axes[i : i + len(methods)])
i += len(methods)
def show_all(*data_nbrs, method="ambient", title=None, figsize=None, sharex=False):
args = [(data_nbr, method) for data_nbr in data_nbrs]
show(*args, title=title, figsize=figsize, sharex=sharex)
def show_scatter(
*data_nbrs,
name,
title=None,
figsize=None,
sharex=False,
sharey=False,
s=0.1,
alpha=1.0,
):
num_rows = len(data_nbrs)
_, axes = init_fig(
num_rows=num_rows, title=title, figsize=figsize, sharex=sharex, sharey=sharey
)
for i, data_nbr in enumerate(data_nbrs):
data_nbr.dscatter(name, axes=axes[i : i + 1], s=s, alpha=alpha)
@dataclass
class AmbientNeighbors:
near: NearestNeighbors = None
random: NearestNeighbors = None
class DataNeighbors:
def __init__(
self,
data,
n_neighbors=15,
nn_method="exact",
data_name=None,
metric="euclidean",
):
self.data = data
self.embedded = {}
nn = calculate_neighbors(
data,
n_neighbors=n_neighbors,
method=nn_method,
include_self=False,
metric=metric,
)
nn.dist = nn.dist.ravel()
rnn = random_neighbors(data, n_neighbors=n_neighbors, distance=metric)
rnn.dist = rnn.dist.ravel()
self.ambient = AmbientNeighbors(nn, rnn)
if data_name is None:
data_name = f"{data.shape[1]}D"
self.data_name = data_name
self.n_neighbors = n_neighbors
def embed(self, method, params=None, name=None):
if name is None:
name = method
result = embed_nbrs(self.data, method, params, self.ambient)
self.embedded[name] = result
def distances(self, name="ambient"):
if name == "ambient":
return self._ambn, self._ambr
return self.embedded[name][:2]
def describe(self, names=None):
if names is None:
names = ["ambient"] + list(self.embedded.keys())
if isinstance(names, str):
names = [names]
data_dict = {}
for name in names:
if name == "ambient":
data_dict["ambient_near"] = self._ambn
data_dict["ambient_random"] = self._ambr
else:
ennd, ernd = self.distances(name)
data_dict[f"{name}_near"] = ennd
data_dict[f"{name}_random"] = ernd
df = pd.DataFrame(data_dict)
return describe(
df,
count_zeros=False,
).rename_axis(index=self.data_name)
@property
def _ambn(self):
return self.ambient.near.dist
@property
def _ambr(self):
return self.ambient.random.dist
def dscatter(
self,
*names,
axes=None,
s=0.1,
alpha=1.0,
figsize=(9, 4),
sharex=False,
sharey=False,
):
ann, arnn = self.distances("ambient")
if isinstance(names, str):
names = [names]
if axes is None:
_, axes = init_fig(
num_rows=len(names),
title=self.data_name,
figsize=figsize,
sharex=sharex,
sharey=sharey,
)
for i, name in enumerate(names):
enn, ernn = self.distances(name)
axes[i, 0].set_title(f"{self.data_name} {name} {self.n_neighbors}-nearest")
axes[i, 0].set_xlabel("ambient distance")
axes[i, 0].set_ylabel(f"{name} distance")
sns.scatterplot(x=ann, y=enn, ax=axes[i, 0], s=s, alpha=alpha)
axes[i, 1].set_title(f"{self.data_name} {name} {self.n_neighbors}-random")
axes[i, 1].set_xlabel("ambient distance")
axes[i, 1].set_ylabel(f"{name} distance")
sns.scatterplot(x=arnn, y=ernn, ax=axes[i, 1], s=s, alpha=alpha)
def dhist(self, *names, axes=None, figsize=(9, 3), sharex=False, show=None):
if not names:
names = ["ambient"]
if isinstance(names, str):
names = [names]
if axes is None:
_, axes = init_fig(
num_rows=len(names),
title=self.data_name,
figsize=figsize,
sharex=sharex,
)
for i, name in enumerate(names):
nn, rnn = self.distances(name)
axes[i, 0].set_title(f"{self.data_name} {name} {self.n_neighbors}-nearest")
sns.histplot(nn, ax=axes[i, 0])
axes[i, 1].set_title(f"{self.data_name} {name} {self.n_neighbors}-random")
sns.histplot(rnn, ax=axes[i, 1])
def embed_plot(self, name, **kwargs):
coords = self.embedded[name][2]
kwargs["coords"] = coords
sns_embed_plot(**kwargs)time: 66.8 ms (started: 2023-07-23 14:48:23 -07:00)
To start, let’s look at some gaussians of various dimensionality: 2D, 3D, 5D, 10D and 50D.
INFO Could not load library with AVX2 support due to: loader.py:58 ModuleNotFoundError("No module named 'faiss.swigfaiss_avx2'")
time: 4.06 s (started: 2023-04-15 11:27:41 -07:00)
Beyer and co-workers demonstrated a particular manifestation of the curse of dimensionality for nearest neighbor search: as dimensionality increases, the contrast between the distance to nearest neighbors and others begins to disappear, i.e. all distances start to be the same, which calls into question the concept the usefulness of how near a “near” neighbor really is. Pestov relates this to the “concentration of measure”. You will see variations of vocabulary around this, but I’ll call it “distance concentration”.
For the plots below, the left-hand column shows the distribution of 15-nearest neighbors for each Gaussian, and the right-hand column 15 random neighbors per point, with the dimensionality increasing from 2 to 50 as you go down the rows. The x-axis is shared for all plots so the overall trend is easier to see:

time: 7.68 s (started: 2023-04-15 11:27:45 -07:00)
The distance concentration is apparent here, with the nearest neighbor distribution getting more and more similar to the random neighbor distribution as dimensionality increases. Also, both distributions of distances:
It’s a little hard to see what is happening with the low-dimensional nearest neighbor distances, so here are the 2D, 3D, and 5D results again, but without sharing the x-axis:

time: 4.92 s (started: 2023-04-15 11:27:53 -07:00)
There is a skew of the neighbors at low dimensions which is particularly noticeable for the nearest neighbors.
All of that demonstrates that high-dimensional distances do not bear much resemblance to low-dimensional ones. That does not bode well for trying to preserve high-dimensional distances in a lower dimensions.
Does using an angular distance have much effect on the distance concentration?
from drnb.preprocess import renormalize
show_all(
DataNeighbors(renormalize(gaussnd(10000, 2), "l2")),
DataNeighbors(renormalize(gaussnd(10000, 3), "l2")),
DataNeighbors(renormalize(gaussnd(10000, 5), "l2")),
DataNeighbors(renormalize(gaussnd(10000, 10), "l2")),
DataNeighbors(renormalize(gaussnd(10000, 50), "l2")),
method="ambient",
sharex=True,
)INFO Could not load library with AVX2 support due to: loader.py:58 ModuleNotFoundError("No module named 'faiss.swigfaiss_avx2'")
OMP: Info #276: omp_set_nested routine deprecated, please use omp_set_max_active_levels instead.

time: 9.68 s (started: 2023-05-31 22:19:49 -07:00)
show_all(
DataNeighbors(renormalize(gaussnd(10000, 2), "l1")),
DataNeighbors(renormalize(gaussnd(10000, 3), "l1")),
DataNeighbors(renormalize(gaussnd(10000, 5), "l1")),
DataNeighbors(renormalize(gaussnd(10000, 10), "l1")),
DataNeighbors(renormalize(gaussnd(10000, 50), "l1")),
method="ambient",
sharex=True,
)
time: 9.06 s (started: 2023-05-31 22:20:08 -07:00)
g2dnbrs_cos = DataNeighbors(gaussnd(10000, 2), metric="cosine")
g3dnbrs_cos = DataNeighbors(gaussnd(10000, 3), metric="cosine")
g5dnbrs_cos = DataNeighbors(gaussnd(10000, 5), metric="cosine")
g10dnbrs_cos = DataNeighbors(gaussnd(10000, 10), metric="cosine")
g50dnbrs_cos = DataNeighbors(gaussnd(10000, 50), metric="cosine")time: 2.54 s (started: 2023-04-15 11:27:58 -07:00)

time: 5.47 s (started: 2023-04-15 11:28:00 -07:00)
The 2D and 3D results certainly are different. But the overall trend is the same: distances shift away from zero and random and ambient distribution begin to look more alike.
Now let’s look at what using PCA to reduce to 2D does to these distance distributions.
time: 2.48 s (started: 2023-04-15 11:28:06 -07:00)

time: 7.02 s (started: 2023-04-15 11:28:08 -07:00)
We would expect extracting 2 components from a 2D Gaussian would give the same results as with the raw ambient distances, and that is the case, so the first row is of interest only as a reference to what the ambient 2D distances look like.
There is an obvious difference in the trend as the dimensionality of the Gaussians increases: the distance does not shift rightwards to a great degree and the skewness of the distribution remains. In fact, for the random neighbors, the distribution is basically unchanged. This isn’t too surprising as the embedding space is a 2D distribution, so we get a 2D-like distribution regardless of what the original ambient dimensionality.
For nearest neighbors, we do see a shift of the distribution becoming closer to the random neighbor distribution. So this should makes it pretty clear that PCA on high-dimensional data is not going to preserve much local structure.
One other quirk of PCA is apparent if you plot the distances of PCA against the ambient distances. Here’s the 3D results:
The shape of these plots – where there are no points found in the upper left quadrant – means that when PCA transforms points, it will always reduce the distance between points if it has to. It never increases the distance. This is not surprising when you think about how the amount of variance “explained” of the original dataset approaches 100% from below as components are extracted. Here’s the 10D example to confirm the behavior:
To determine how much of the above is a quirk specific to PCA, here are some results using a stochastic version of MMDS, initialized from PCA. While not shown here, I have determined that these settings do reduce the stress of the result compared to PCA, i.e. the distances are better reproduced after applying SMMDS. Note also that a sufficiently long optimization with full MMDS starting from a random initialization will give a better-than-PCA stress with qualitatively similar results, i.e. the results are not a quirk of the stochastic nature of the algorithm or due to a bias from starting from the PCA result.
smmds_params = dict(learning_rate=0.001, n_epochs=5000, random_state=42)
g2dnbrs.embed("smmds", params=smmds_params)
g3dnbrs.embed("smmds", params=smmds_params)
g5dnbrs.embed("smmds", params=smmds_params)
g10dnbrs.embed("smmds", params=smmds_params)
# For the 50D result, I needed to use a larger learning rate to get decent convergence in 5000 epochs
g50dnbrs.embed("smmds", params=dict(learning_rate=0.01, n_epochs=5000, random_state=42))time: 1min 37s (started: 2023-04-15 11:28:17 -07:00)
First, checking in on the distributions:

time: 8.24 s (started: 2023-04-15 11:29:54 -07:00)
The 50D result is very different and is dominating the range of the shared x-axis now, so the sharex=False result is again useful:

time: 7.62 s (started: 2023-04-15 11:30:03 -07:00)
The pattern is still quite similar to the PCA results, but the extra optimization of distances seems to have increased and broadened the distributions. Here’s the 50D distributions for the ambient, PCA and SMMDS distances:

time: 3.44 s (started: 2023-04-15 11:30:10 -07:00)
So compared to PCA, SMMDS embedding into 2D is successful at shifting the distribution of distances so the median value gets closer to the high-dimensional values, but it can’t match the spread of the distribution, nor the symmetry, with the nearest neighbor distribution having a noticeably broad right tail. A similar, but less pronounced pattern can be seen with the 5D Gaussian:

time: 3.39 s (started: 2023-04-15 11:30:14 -07:00)
We can also look at the scatterplot of how the distances are transformed which also clearly shows the shifting and broadening pattern:

time: 1.86 s (started: 2023-04-15 11:30:17 -07:00)
Unlike PCA, SMDS is able to improve the reproduction of distances as a whole by allowing some distances to be larger in the embedded space than the ambient space. Here are the 50D PCA and SMMDS directly compared with a shared Y-axis that shows this clearly:

time: 1.49 s (started: 2023-04-15 11:30:19 -07:00)
And here’s a histogram of the difference between the smmds-embedded distances and the equivalent ambient distances for the random neighbors which demonstrates that there is still a tendency for the distances to be under-predicted, even though some distances are larger than in the ambient space:

time: 340 ms (started: 2023-04-15 11:30:21 -07:00)
The bulk of the disparity in distances are below 0.
Ok, so we have a pretty good idea of what methods that attempt to preserve distance do. How does UMAP compare? To avoid complete graph overload, let’s just look at the 10D and 50D case for now.
time: 32.7 s (started: 2023-04-15 11:30:21 -07:00)

time: 5.05 s (started: 2023-04-15 11:30:54 -07:00)
Obviously there should be little expectation that UMAP preserves distances. The most obvious difference is how the nearest neighbor distribution looks: a sharp peak early, and then a long tail. Meanwhile the random neighbors are less broadly distributed and shifted to a lower distance compared to SMMDS.

time: 4.59 s (started: 2023-04-15 11:30:59 -07:00)
In the 50D case, the nearest neighbors are even more interestingly distributed. The random neighbors have a distribution that seems to have a similar span to the nearest neighbors, but an obviously high peak. Here’s a closer look at just the PCA and UMAP results, as they are the most similar to each other:
The distribution of the random neighbors really doesn’t seem that different.
Let’s also take a look at t-SNE, again for the 10D and 50D case.
[11:31:11] INFO Precomputed initialization provided. Ignoring initalization-related parameters. tsne.py:1329
[11:31:39] INFO Precomputed initialization provided. Ignoring initalization-related parameters. tsne.py:1329
time: 51.4 s (started: 2023-04-15 11:31:05 -07:00)
The t-SNE distances are on a completely different scale to UMAP’s (and any of the other methods we have looked at). The nearest neighbor distribution resembles UMAP’s to the extent of a concentration of very short distances and then a long (slightly bimodal?) tail. Meanwhile, the random distances show a much broader more symmetric pattern.
A similar pattern here, with the bimodal distribution for nearest neighbors more obvious. For the random neighbors, an asymmetry in the distribution is also apparent.
Now let’s look at the scatter plots:

time: 1.16 s (started: 2023-04-15 11:32:00 -07:00)

time: 1.17 s (started: 2023-04-15 11:32:02 -07:00)
These are very different from the PCA and SMMDS results. Really very hard to detect any sort of relationship between the ambient and embedded distances (which again should not be too surprising).
time: 8.11 s (started: 2023-04-15 11:32:03 -07:00)
time: 4min 22s (started: 2023-04-15 11:32:11 -07:00)

time: 7.75 s (started: 2023-04-15 11:36:33 -07:00)
time: 8.23 s (started: 2023-04-15 11:42:57 -07:00)
time: 4min 31s (started: 2023-04-15 11:43:05 -07:00)

time: 8.33 s (started: 2023-04-15 11:47:37 -07:00)
OMP: Info #276: omp_set_nested routine deprecated, please use omp_set_max_active_levels instead.
time: 2.4 s (started: 2023-06-30 16:28:56 -07:00)
time: 25.5 s (started: 2023-06-30 16:29:21 -07:00)
[16:30:46] INFO No suitable pre-calculated neighbors available __init__.py:325
INFO Using 'faiss' to find nearest neighbors __init__.py:83
INFO Finding 16 neighbors using faiss with euclidean metric and params: {} __init__.py:96
INFO Running LEOPOLD leopold.py:209
[16:30:56] INFO Embedding completed leopold.py:212
time: 10.4 s (started: 2023-06-30 16:30:45 -07:00)
[16:31:02] INFO No suitable pre-calculated neighbors available __init__.py:325
[16:31:03] INFO Using 'faiss' to find nearest neighbors __init__.py:83
INFO Finding 16 neighbors using faiss with euclidean metric and params: {} __init__.py:96
INFO Running LEOPOLD leopold.py:209
[16:31:07] INFO Embedding completed leopold.py:212
time: 4.56 s (started: 2023-06-30 16:31:02 -07:00)
[16:31:15] INFO No suitable pre-calculated neighbors available __init__.py:325
INFO Using 'faiss' to find nearest neighbors __init__.py:83
INFO Finding 16 neighbors using faiss with euclidean metric and params: {} __init__.py:96
INFO Running LEOPOLD leopold.py:209
[16:31:20] INFO Embedding completed leopold.py:212
time: 4.88 s (started: 2023-06-30 16:31:15 -07:00)

time: 12.5 s (started: 2023-06-30 16:32:49 -07:00)

time: 10.9 s (started: 2023-06-30 16:34:07 -07:00)
[16:38:54] INFO No suitable pre-calculated neighbors available __init__.py:325
INFO Using 'faiss' to find nearest neighbors __init__.py:83
INFO Finding 16 neighbors using faiss with euclidean metric and params: {} __init__.py:96
[16:38:55] INFO Running LEOPOLD leopold.py:209
[16:39:05] INFO Embedding completed leopold.py:212
time: 10.9 s (started: 2023-06-30 16:38:54 -07:00)
INFO No suitable pre-calculated neighbors available __init__.py:325
INFO Using 'faiss' to find nearest neighbors __init__.py:83
INFO Finding 16 neighbors using faiss with euclidean metric and params: {} __init__.py:96
INFO Running LEOPOLD leopold.py:209
[16:39:16] INFO Embedding completed leopold.py:212
time: 10.4 s (started: 2023-06-30 16:39:05 -07:00)
INFO No suitable pre-calculated neighbors available __init__.py:325
INFO Using 'faiss' to find nearest neighbors __init__.py:83
INFO Finding 16 neighbors using faiss with euclidean metric and params: {} __init__.py:96
INFO Running LEOPOLD leopold.py:209
[16:39:26] INFO Embedding completed leopold.py:212
time: 10.8 s (started: 2023-06-30 16:39:16 -07:00)
time: 1.41 s (started: 2023-06-30 16:39:27 -07:00)

time: 9.81 s (started: 2023-06-30 16:39:52 -07:00)
OMP: Info #276: omp_set_nested routine deprecated, please use omp_set_max_active_levels instead.
[14:48:41] INFO No suitable pre-calculated neighbors available __init__.py:325
INFO Using 'faiss' to find nearest neighbors __init__.py:83
INFO Finding 16 neighbors using faiss with euclidean metric and params: {} __init__.py:96
INFO Running LEOPOLD leopold.py:210
[14:48:55] INFO Embedding completed leopold.py:213
[14:48:56] INFO No suitable pre-calculated neighbors available __init__.py:325
INFO Using 'faiss' to find nearest neighbors __init__.py:83
INFO Finding 16 neighbors using faiss with euclidean metric and params: {} __init__.py:96
INFO Running LEOPOLD leopold.py:210
[14:48:57] INFO Embedding completed leopold.py:213
INFO No suitable pre-calculated neighbors available __init__.py:325
INFO Using 'faiss' to find nearest neighbors __init__.py:83
INFO Finding 16 neighbors using faiss with euclidean metric and params: {} __init__.py:96
INFO Running LEOPOLD leopold.py:210
[14:49:01] INFO Embedding completed leopold.py:213

time: 35.8 s (started: 2023-07-23 14:48:36 -07:00)
leo2_near 0.562087
leo2_random 4.648446
pca_near 2.602610
pca_random 12.615314
Name: 50%, dtype: float64
time: 55.7 ms (started: 2023-07-23 14:56:59 -07:00)
[16:44:16] INFO No suitable pre-calculated neighbors available __init__.py:325
INFO Using 'faiss' to find nearest neighbors __init__.py:83
INFO Finding 16 neighbors using faiss with euclidean metric and params: {} __init__.py:96
INFO Running LEOPOLD leopold.py:209
[16:44:23] INFO Embedding completed leopold.py:212
INFO No suitable pre-calculated neighbors available __init__.py:325
INFO Using 'faiss' to find nearest neighbors __init__.py:83
INFO Finding 16 neighbors using faiss with euclidean metric and params: {} __init__.py:96
INFO Running LEOPOLD leopold.py:209
[16:44:28] INFO Embedding completed leopold.py:212
INFO No suitable pre-calculated neighbors available __init__.py:325
INFO Using 'faiss' to find nearest neighbors __init__.py:83
INFO Finding 16 neighbors using faiss with euclidean metric and params: {} __init__.py:96
INFO Running LEOPOLD leopold.py:209
[16:44:33] INFO Embedding completed leopold.py:212

time: 43.5 s (started: 2023-06-30 16:44:15 -07:00)
[16:47:46] INFO No suitable pre-calculated neighbors available __init__.py:325
INFO Using 'faiss' to find nearest neighbors __init__.py:83
INFO Finding 16 neighbors using faiss with euclidean metric and params: {} __init__.py:96
[16:47:48] INFO Running LEOPOLD leopold.py:209
[16:48:25] INFO Embedding completed leopold.py:212
INFO No suitable pre-calculated neighbors available __init__.py:325
INFO Using 'faiss' to find nearest neighbors __init__.py:83
INFO Finding 16 neighbors using faiss with euclidean metric and params: {} __init__.py:96
[16:48:27] INFO Running LEOPOLD leopold.py:209
[16:49:11] INFO Embedding completed leopold.py:212
INFO No suitable pre-calculated neighbors available __init__.py:325
INFO Using 'faiss' to find nearest neighbors __init__.py:83
INFO Finding 16 neighbors using faiss with euclidean metric and params: {} __init__.py:96
[16:49:13] INFO Running LEOPOLD leopold.py:209
[16:50:10] INFO Embedding completed leopold.py:212


time: 3min 8s (started: 2023-06-30 16:47:42 -07:00)
[16:53:18] INFO No suitable pre-calculated neighbors available __init__.py:325
INFO Using 'faiss' to find nearest neighbors __init__.py:83
INFO Finding 16 neighbors using faiss with euclidean metric and params: {} __init__.py:96
[16:53:19] INFO Running LEOPOLD leopold.py:209
[16:53:34] INFO Embedding completed leopold.py:212
INFO No suitable pre-calculated neighbors available __init__.py:325
INFO Using 'faiss' to find nearest neighbors __init__.py:83
INFO Finding 16 neighbors using faiss with euclidean metric and params: {} __init__.py:96
[16:53:35] INFO Running LEOPOLD leopold.py:209
[16:53:50] INFO Embedding completed leopold.py:212
INFO No suitable pre-calculated neighbors available __init__.py:325
INFO Using 'faiss' to find nearest neighbors __init__.py:83
INFO Finding 16 neighbors using faiss with euclidean metric and params: {} __init__.py:96
[16:53:51] INFO Running LEOPOLD leopold.py:209
[16:54:07] INFO Embedding completed leopold.py:212


time: 1min 21s (started: 2023-06-30 16:53:17 -07:00)
[16:55:31] INFO No suitable pre-calculated neighbors available __init__.py:325
INFO Using 'faiss' to find nearest neighbors __init__.py:83
INFO Finding 16 neighbors using faiss with euclidean metric and params: {} __init__.py:96
[16:55:32] INFO Running LEOPOLD leopold.py:209
[16:55:56] INFO Embedding completed leopold.py:212
INFO No suitable pre-calculated neighbors available __init__.py:325
INFO Using 'faiss' to find nearest neighbors __init__.py:83
INFO Finding 16 neighbors using faiss with euclidean metric and params: {} __init__.py:96
[16:55:57] INFO Running LEOPOLD leopold.py:209
[16:56:23] INFO Embedding completed leopold.py:212
INFO No suitable pre-calculated neighbors available __init__.py:325
INFO Using 'faiss' to find nearest neighbors __init__.py:83
INFO Finding 16 neighbors using faiss with euclidean metric and params: {} __init__.py:96
INFO Running LEOPOLD leopold.py:209
[16:56:48] INFO Embedding completed leopold.py:212


time: 1min 36s (started: 2023-06-30 16:55:30 -07:00)
[16:57:52] INFO No suitable pre-calculated neighbors available __init__.py:325
INFO Using 'faiss' to find nearest neighbors __init__.py:83
INFO Finding 16 neighbors using faiss with euclidean metric and params: {} __init__.py:96
INFO Running LEOPOLD leopold.py:209
[16:57:53] INFO Embedding completed leopold.py:212
INFO No suitable pre-calculated neighbors available __init__.py:325
INFO Using 'faiss' to find nearest neighbors __init__.py:83
INFO Finding 16 neighbors using faiss with euclidean metric and params: {} __init__.py:96
INFO Running LEOPOLD leopold.py:209
[16:57:54] INFO Embedding completed leopold.py:212
INFO No suitable pre-calculated neighbors available __init__.py:325
INFO Using 'faiss' to find nearest neighbors __init__.py:83
INFO Finding 16 neighbors using faiss with euclidean metric and params: {} __init__.py:96
INFO Running LEOPOLD leopold.py:209
[16:57:55] INFO Embedding completed leopold.py:212


time: 8.14 s (started: 2023-06-30 16:57:51 -07:00)
[16:58:58] INFO No suitable pre-calculated neighbors available __init__.py:325
INFO Using 'faiss' to find nearest neighbors __init__.py:83
INFO Finding 16 neighbors using faiss with euclidean metric and params: {} __init__.py:96
INFO Running LEOPOLD leopold.py:209
INFO Embedding completed leopold.py:212
INFO No suitable pre-calculated neighbors available __init__.py:325
INFO Using 'faiss' to find nearest neighbors __init__.py:83
INFO Finding 16 neighbors using faiss with euclidean metric and params: {} __init__.py:96
INFO Running LEOPOLD leopold.py:209
[16:58:59] INFO Embedding completed leopold.py:212
INFO No suitable pre-calculated neighbors available __init__.py:325
INFO Using 'faiss' to find nearest neighbors __init__.py:83
INFO Finding 16 neighbors using faiss with euclidean metric and params: {} __init__.py:96
INFO Running LEOPOLD leopold.py:209
INFO Embedding completed leopold.py:212


time: 7.28 s (started: 2023-06-30 16:58:57 -07:00)
[16:59:44] INFO No suitable pre-calculated neighbors available __init__.py:325
INFO Using 'faiss' to find nearest neighbors __init__.py:83
INFO Finding 16 neighbors using faiss with euclidean metric and params: {} __init__.py:96
INFO Running LEOPOLD leopold.py:209
[16:59:53] INFO Embedding completed leopold.py:212
INFO No suitable pre-calculated neighbors available __init__.py:325
INFO Using 'faiss' to find nearest neighbors __init__.py:83
INFO Finding 16 neighbors using faiss with euclidean metric and params: {} __init__.py:96
[16:59:54] INFO Running LEOPOLD leopold.py:209
[17:00:01] INFO Embedding completed leopold.py:212
INFO No suitable pre-calculated neighbors available __init__.py:325
INFO Using 'faiss' to find nearest neighbors __init__.py:83
INFO Finding 16 neighbors using faiss with euclidean metric and params: {} __init__.py:96
[17:00:02] INFO Running LEOPOLD leopold.py:209
[17:00:11] INFO Embedding completed leopold.py:212


time: 1min 17s (started: 2023-06-30 16:59:41 -07:00)
[17:01:57] INFO No suitable pre-calculated neighbors available __init__.py:325
INFO Using 'faiss' to find nearest neighbors __init__.py:83
INFO Finding 16 neighbors using faiss with euclidean metric and params: {} __init__.py:96
INFO Running LEOPOLD leopold.py:209
[17:02:06] INFO Embedding completed leopold.py:212
INFO No suitable pre-calculated neighbors available __init__.py:325
INFO Using 'faiss' to find nearest neighbors __init__.py:83
INFO Finding 16 neighbors using faiss with euclidean metric and params: {} __init__.py:96
INFO Running LEOPOLD leopold.py:209
[17:02:15] INFO Embedding completed leopold.py:212
INFO No suitable pre-calculated neighbors available __init__.py:325
INFO Using 'faiss' to find nearest neighbors __init__.py:83
INFO Finding 16 neighbors using faiss with euclidean metric and params: {} __init__.py:96
INFO Running LEOPOLD leopold.py:209
[17:02:24] INFO Embedding completed leopold.py:212


time: 39.9 s (started: 2023-06-30 17:01:56 -07:00)
[17:03:06] INFO No suitable pre-calculated neighbors available __init__.py:325
INFO Using 'faiss' to find nearest neighbors __init__.py:83
INFO Finding 16 neighbors using faiss with euclidean metric and params: {} __init__.py:96
INFO Running LEOPOLD leopold.py:209
[17:03:07] INFO Embedding completed leopold.py:212
INFO No suitable pre-calculated neighbors available __init__.py:325
INFO Using 'faiss' to find nearest neighbors __init__.py:83
INFO Finding 16 neighbors using faiss with euclidean metric and params: {} __init__.py:96
INFO Running LEOPOLD leopold.py:209
[17:03:09] INFO Embedding completed leopold.py:212
INFO No suitable pre-calculated neighbors available __init__.py:325
INFO Using 'faiss' to find nearest neighbors __init__.py:83
INFO Finding 16 neighbors using faiss with euclidean metric and params: {} __init__.py:96
INFO Running LEOPOLD leopold.py:209
[17:03:11] INFO Embedding completed leopold.py:212


time: 17.3 s (started: 2023-06-30 17:03:05 -07:00)
[17:04:08] INFO No suitable pre-calculated neighbors available __init__.py:325
INFO Using 'faiss' to find nearest neighbors __init__.py:83
INFO Finding 16 neighbors using faiss with euclidean metric and params: {} __init__.py:96
[17:04:14] INFO Running LEOPOLD leopold.py:209
[17:04:56] INFO Embedding completed leopold.py:212
INFO No suitable pre-calculated neighbors available __init__.py:325
INFO Using 'faiss' to find nearest neighbors __init__.py:83
INFO Finding 16 neighbors using faiss with euclidean metric and params: {} __init__.py:96
[17:05:02] INFO Running LEOPOLD leopold.py:209
[17:05:46] INFO Embedding completed leopold.py:212
INFO No suitable pre-calculated neighbors available __init__.py:325
INFO Using 'faiss' to find nearest neighbors __init__.py:83
INFO Finding 16 neighbors using faiss with euclidean metric and params: {} __init__.py:96
[17:05:51] INFO Running LEOPOLD leopold.py:209
[17:06:33] INFO Embedding completed leopold.py:212


time: 2min 57s (started: 2023-06-30 17:03:58 -07:00)
[17:08:56] INFO No suitable pre-calculated neighbors available __init__.py:325
INFO Using 'faiss' to find nearest neighbors __init__.py:83
INFO Finding 16 neighbors using faiss with euclidean metric and params: {} __init__.py:96
[17:09:11] INFO Running LEOPOLD leopold.py:209
[17:09:46] INFO Embedding completed leopold.py:212
INFO No suitable pre-calculated neighbors available __init__.py:325
INFO Using 'faiss' to find nearest neighbors __init__.py:83
INFO Finding 16 neighbors using faiss with euclidean metric and params: {} __init__.py:96
[17:10:02] INFO Running LEOPOLD leopold.py:209
[17:10:30] INFO Embedding completed leopold.py:212
INFO No suitable pre-calculated neighbors available __init__.py:325
INFO Using 'faiss' to find nearest neighbors __init__.py:83
INFO Finding 16 neighbors using faiss with euclidean metric and params: {} __init__.py:96
[17:10:46] INFO Running LEOPOLD leopold.py:209
[17:11:15] INFO Embedding completed leopold.py:212


time: 3min 40s (started: 2023-06-30 17:08:29 -07:00)
[21:27:07] INFO No suitable pre-calculated neighbors available __init__.py:325
INFO Using 'faiss' to find nearest neighbors __init__.py:83
INFO Finding 16 neighbors using faiss with euclidean metric and params: {} __init__.py:96
[21:27:08] INFO Running LEOPOLD leopold.py:209
[21:27:54] INFO Embedding completed leopold.py:212
INFO No suitable pre-calculated neighbors available __init__.py:325
INFO Using 'faiss' to find nearest neighbors __init__.py:83
INFO Finding 16 neighbors using faiss with euclidean metric and params: {} __init__.py:96
[21:27:56] INFO Running LEOPOLD leopold.py:209
[21:28:34] INFO Embedding completed leopold.py:212
INFO No suitable pre-calculated neighbors available __init__.py:325
INFO Using 'faiss' to find nearest neighbors __init__.py:83
INFO Finding 16 neighbors using faiss with euclidean metric and params: {} __init__.py:96
[21:28:36] INFO Running LEOPOLD leopold.py:209
[21:29:14] INFO Embedding completed leopold.py:212


time: 2min 50s (started: 2023-06-30 21:27:02 -07:00)
OMP: Info #276: omp_set_nested routine deprecated, please use omp_set_max_active_levels instead.
[22:08:39] INFO No suitable pre-calculated neighbors available __init__.py:325
INFO Using 'faiss' to find nearest neighbors __init__.py:83
INFO Finding 16 neighbors using faiss with euclidean metric and params: {} __init__.py:96
[22:08:40] INFO Running LEOPOLD leopold.py:210
[22:09:25] INFO Embedding completed leopold.py:213
[22:09:26] INFO No suitable pre-calculated neighbors available __init__.py:325
INFO Using 'faiss' to find nearest neighbors __init__.py:83
INFO Finding 16 neighbors using faiss with euclidean metric and params: {} __init__.py:96
[22:09:27] INFO Running LEOPOLD leopold.py:210
[22:10:04] INFO Embedding completed leopold.py:213
INFO No suitable pre-calculated neighbors available __init__.py:325
INFO Using 'faiss' to find nearest neighbors __init__.py:83
INFO Finding 16 neighbors using faiss with euclidean metric and params: {} __init__.py:96
[22:10:06] INFO Running LEOPOLD leopold.py:210
[22:10:44] INFO Embedding completed leopold.py:213


time: 2min 49s (started: 2023-06-30 22:08:32 -07:00)
OMP: Info #276: omp_set_nested routine deprecated, please use omp_set_max_active_levels instead.
[22:03:05] INFO No suitable pre-calculated neighbors available __init__.py:325
INFO Using 'faiss' to find nearest neighbors __init__.py:83
INFO Finding 16 neighbors using faiss with euclidean metric and params: {} __init__.py:96
[22:03:07] INFO Running LEOPOLD leopold.py:210
[22:03:58] INFO Embedding completed leopold.py:213
INFO No suitable pre-calculated neighbors available __init__.py:325
INFO Using 'faiss' to find nearest neighbors __init__.py:83
INFO Finding 16 neighbors using faiss with euclidean metric and params: {} __init__.py:96
[22:04:00] INFO Running LEOPOLD leopold.py:210
[22:04:40] INFO Embedding completed leopold.py:213
INFO No suitable pre-calculated neighbors available __init__.py:325
INFO Using 'faiss' to find nearest neighbors __init__.py:83
INFO Finding 16 neighbors using faiss with euclidean metric and params: {} __init__.py:96
[22:04:42] INFO Running LEOPOLD leopold.py:210
[22:05:24] INFO Embedding completed leopold.py:213


time: 3min 1s (started: 2023-06-30 22:02:59 -07:00)
OMP: Info #276: omp_set_nested routine deprecated, please use omp_set_max_active_levels instead.
[08:22:08] INFO No suitable pre-calculated neighbors available __init__.py:325
INFO Using 'faiss' to find nearest neighbors __init__.py:83
INFO Finding 16 neighbors using faiss with euclidean metric and params: {} __init__.py:96
[08:22:09] INFO Running LEOPOLD leopold.py:209
[08:23:07] INFO Embedding completed leopold.py:212
INFO No suitable pre-calculated neighbors available __init__.py:325
INFO Using 'faiss' to find nearest neighbors __init__.py:83
INFO Finding 16 neighbors using faiss with euclidean metric and params: {} __init__.py:96
[08:23:09] INFO Running LEOPOLD leopold.py:209
[08:23:56] INFO Embedding completed leopold.py:212
INFO No suitable pre-calculated neighbors available __init__.py:325
INFO Using 'faiss' to find nearest neighbors __init__.py:83
INFO Finding 16 neighbors using faiss with euclidean metric and params: {} __init__.py:96
[08:23:58] INFO Running LEOPOLD leopold.py:209
[08:24:45] INFO Embedding completed leopold.py:212


time: 3min 17s (started: 2023-07-01 08:22:01 -07:00)