You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
help='Column containing pre-computed nearest neighbors in format: {"ids": [n1, n2, ...], "distances": [d1, d2, ...]}. IDs should be zero-based row indices.',
229
229
)
230
+
@click.option(
231
+
"--pagerank",
232
+
"pagerank_column",
233
+
default=None,
234
+
is_flag=False,
235
+
flag_value="__compute__",
236
+
help="Compute PageRank scores from the neighbor graph, or specify a column containing pre-computed scores. Automatically computed when --image is specified.",
237
+
)
230
238
@click.option(
231
239
"--query",
232
240
default=None,
@@ -352,6 +360,7 @@ def main(
352
360
x_column: str|None,
353
361
y_column: str|None,
354
362
neighbors_column: str|None,
363
+
pagerank_column: str|None,
355
364
query: str|None,
356
365
sample: int|None,
357
366
umap_n_neighbors: int|None,
@@ -475,12 +484,32 @@ def main(
475
484
labels_df=load_pandas_data(labels)
476
485
labels_resolved=labels_df.to_dict("records")
477
486
487
+
# Compute PageRank from neighbor graph when requested or when --image is specified
488
+
should_compute_pagerank= (pagerank_column=="__compute__") or (
0 commit comments