View source: R/params-generated.R
| params_nn | R Documentation |
Wrapper function to generate nearest neighbour parameters
params_nn(
dist_metric = c("euclidean", "cosine"),
n_tree = 50L,
search_budget = NULL,
m = 16L,
ef_construction = 100L,
ef_search = 100L,
diversify_prob = 0,
delta = 0.001,
ef_budget = NULL,
extract_knn = TRUE,
bt_budget = 0.1,
n_list = NULL,
n_probes = NULL
)
dist_metric |
String. The distance metric to use. One of |
n_tree |
Integer. Number of trees for Annoy. Defaults to |
search_budget |
Integer or |
m |
Integer. Number of bidirectional links for HNSW. Defaults to |
ef_construction |
Integer. Size of the dynamic candidate list during
HNSW construction. Defaults to |
ef_search |
Integer. Size of the dynamic candidate list during HNSW
search. Defaults to |
diversify_prob |
Numeric. Diversification probability for NN descent.
Defaults to |
delta |
Numeric. Precision parameter for NN descent. Defaults to
|
ef_budget |
Integer or |
extract_knn |
Boolean. Only affects the |
bt_budget |
Numeric. Budget for ball tree search. Defaults to |
n_list |
Integer or |
n_probes |
Integer or |
A named list with the following elements:
dist_metric - String. The distance metric to use. One of
c("euclidean", "cosine"). Defaults to "euclidean".
n_tree - Integer. Number of trees for Annoy. Defaults to 50L.
search_budget - Integer or NULL. Search budget for Annoy. Defaults
to NULL.
m - Integer. Number of bidirectional links for HNSW. Defaults to
16L.
ef_construction - Integer. Size of the dynamic candidate list during
HNSW construction. Defaults to 100L.
ef_search - Integer. Size of the dynamic candidate list during HNSW
search. Defaults to 100L.
diversify_prob - Numeric. Diversification probability for NN descent.
Defaults to 0.0.
delta - Numeric. Precision parameter for NN descent. Defaults to
0.001.
ef_budget - Integer or NULL. Effort budget for NN descent. Ignored
when extract_knn is TRUE, as no search runs. Defaults to NULL.
extract_knn - Boolean. Only affects the "nndescent" backend. If
TRUE, the descent hands back the graph it just built instead of running a
beam search over it. Faster, at a recall of roughly 0.98 rather than
0.99-1.00. Defaults to TRUE.
bt_budget - Numeric. Budget for ball tree search. Defaults to 0.1.
n_list - Integer or NULL. Number of clusters to use for IVF. If
NULL, uses sqrt(n). Defaults to NULL.
n_probes - Integer or NULL. Number of clusters to probe for IVF. If
NULL, uses sqrt(n_list). Defaults to NULL.
params_nn()
params_nn(dist_metric = "cosine", ef_search = 200L)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.