#[repr(C)]pub struct cuvsNNDescentIndexParams {
pub metric: cuvsDistanceType,
pub metric_arg: f32,
pub graph_degree: usize,
pub intermediate_graph_degree: usize,
pub max_iterations: usize,
pub termination_threshold: f32,
pub return_distances: bool,
pub dist_comp_dtype: cuvsNNDescentDistCompDtype,
}Expand description
@defgroup nn_descent_c_index_params The nn-descent algorithm parameters. @{ / /** @brief Parameters used to build an nn-descent index
metric: The distance metric to use
metric_arg: The argument used by distance metrics like Minkowskidistance
graph_degree: For an input dataset of dimensions (N, D),
determines the final dimensions of the all-neighbors knn graph
which turns out to be of dimensions (N, graph_degree)
intermediate_graph_degree: Internally, nn-descent builds an
all-neighbors knn graph of dimensions (N, intermediate_graph_degree)
before selecting the final graph_degree neighbors. It’s recommended
that intermediate_graph_degree >= 1.5 * graph_degree
max_iterations: The number of iterations that nn-descent will refine
the graph for. More iterations produce a better quality graph at cost of performance
termination_threshold: The delta at which nn-descent will terminate its iterations
return_distances: Boolean to decide whether to return distances array
dist_comp_dtype: dtype to use for distance computation. Defaults to NND_DIST_COMP_AUTO which automatically determines the best dtype for distance computation based on the dataset dimensions. Use NND_DIST_COMP_FP32 for better precision at the cost of performance and memory usage. This option is only valid when data type is fp32. Use NND_DIST_COMP_FP16 for better performance and memory usage at the cost of precision.
Fields§
§metric: cuvsDistanceType§metric_arg: f32§graph_degree: usize§intermediate_graph_degree: usize§max_iterations: usize§termination_threshold: f32§return_distances: bool§dist_comp_dtype: cuvsNNDescentDistCompDtypeTrait Implementations§
Source§impl Clone for cuvsNNDescentIndexParams
impl Clone for cuvsNNDescentIndexParams
Source§fn clone(&self) -> cuvsNNDescentIndexParams
fn clone(&self) -> cuvsNNDescentIndexParams
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more