Skip to contents

Streams every row of a validated full KNN graph, computes the same conditional probabilities as native float32 t-SNE, externally sorts directed pairs, and writes symmetric normalized CSR affinities. The complete graph is never materialized in memory. A content-hashed manifest permits massive_affinity_graph() to reload the result. The saved graph can feed the experimental CPU massive_tsne_optimize() route.

Usage

massive_tsne_affinities(
  x,
  perplexity,
  output,
  memory_limit = fastembedr_memory_option(),
  backend = "cpu",
  n.cores = 1L,
  checkpoint = FALSE,
  resume = FALSE,
  checkpoint_every = 100L,
  sort_method = c("global", "bucketed"),
  consume_knn = FALSE
)

Arguments

x

A distance-valued massive_knn_graph() descriptor.

perplexity

Positive perplexity no larger than the KNN width.

output

New CSR output prefix.

memory_limit

RAM budget for external sorting, at least 64 MB. When omitted, uses options(memory_limit = ...), or detected available RAM.

backend

Only "cpu" is supported for graph construction.

n.cores

CPU workers for independent conditional-probability rows.

checkpoint

Save completed sorted-pair runs for resume.

resume

Continue a matching interrupted graph sort.

checkpoint_every

Save progress after this many input blocks.

sort_method

Global restartable sort or lower-SSD bucketed sort.

consume_knn

Explicitly delete package-built KNN files after bucket staging. Rebuilding KNN is required if construction fails.

Value

An experimental symmetric fastEmbedR_massive_graph descriptor.