Skip to contents

Controls for ANN algorithms used in the package

Usage

controls_ann(
  sparse = FALSE,
  k_search = 30,
  nnd = list(k_build = 30, use_alt_metric = FALSE, init = "tree", n_trees = NULL,
    leaf_size = NULL, max_tree_depth = 200, margin = "auto", n_iters = NULL, delta =
    0.001, max_candidates = NULL, low_memory = TRUE, n_search_trees = 1,
    pruning_degree_multiplier = 1.5, diversify_prob = 1, weight_by_degree = FALSE,
    prune_reverse = FALSE, progress = "bar", obs = "R", max_search_fraction = 1, epsilon
    = 0.1),
  hnsw = list(M = 25, ef_c = 200, ef_s = 200, grain_size = 1, byrow = TRUE),
  lsh = list(bucket_size = 500, hash_width = 10, num_probes = 0, projections = 10, tables
    = 30),
  kd = list(algorithm = "dual_tree", epsilon = 0, leaf_size = 20, random_basis = FALSE,
    rho = 0.7, tau = 0, tree_type = "kd"),
  annoy = list(n_trees = 250, build_on_disk = FALSE)
)

Arguments

sparse

whether sparse data should be used as an input for algorithms,

k_search

number of neighbours to search,

nnd

list of parameters for rnndescent::rnnd_build() and rnndescent::rnnd_query(),

hnsw

list of parameters for RcppHNSW::hnsw_build() and RcppHNSW::hnsw_search(),

lsh

list of parameters for mlpack::lsh() function,

kd

list of kd parameters for mlpack::knn() function,

annoy

list of parameters for RcppAnnoy package.

Value

Returns a list with parameters

Author

Maciej Beręsewicz