Prepare a bigmemory::big.matrix reference for repeated exact search
Source: R/knn_interface.R
knn_prepare_bigmatrix.RdPrepare a bigmemory::big.matrix reference for repeated exact search
Usage
knn_prepare_bigmatrix(
x,
metric = "euclidean",
block_size = knn_default_block_size(),
plan = NULL,
validate = TRUE,
cache_path = NULL
)Arguments
- x
A
bigmemory::big.matrixor an external pointer referencing the reference matrix.- metric
Distance metric. Supported values are
"euclidean","sqeuclidean", and"cosine".- block_size
Number of rows to process per query and reference block.
- plan
Optional execution plan returned by
knn_plan_bigmatrix().- validate
Logical flag controlling whether the preparation pass checks for finite, metric-compatible rows while building the cache.
- cache_path
Optional path where a serializable prepared-reference cache should be written with
saveRDS().