mnncorrect
Batch correction with mutual nearest neighbors
Loading...
Searching...
No Matches
mnncorrect::Options< Index_, Float_, Matrix_ > Struct Template Reference

Options for compute(). More...

#include <mnncorrect.hpp>

Public Attributes

int num_neighbors = 15
 
int num_steps = 1
 
std::shared_ptr< knncolle::Builder< Index_, Float_, Float_, Matrix_ > > builder
 
MergePolicy merge_policy = MergePolicy::RSS
 
int num_threads = 1
 

Detailed Description

template<typename Index_, typename Float_, class Matrix_ = knncolle::Matrix<Index_, Float_>>
struct mnncorrect::Options< Index_, Float_, Matrix_ >

Options for compute().

Template Parameters
Index_Integer type of the observation indices.
Float_Floating-point type of the input/output data.
Matrix_Class of the input data matrix for the neighbor search. This should satisfy the knncolle::Matrix interface. Alternatively, it may be a knncolle::SimpleMatrix.

Member Data Documentation

◆ builder

template<typename Index_ , typename Float_ , class Matrix_ = knncolle::Matrix<Index_, Float_>>
std::shared_ptr<knncolle::Builder<Index_, Float_, Float_, Matrix_> > mnncorrect::Options< Index_, Float_, Matrix_ >::builder

Algorithm to use for building the nearest-neighbor search indices. If NULL, defaults to an exact search via knncolle::VptreeBuilder with Euclidean distances.

◆ merge_policy

template<typename Index_ , typename Float_ , class Matrix_ = knncolle::Matrix<Index_, Float_>>
MergePolicy mnncorrect::Options< Index_, Float_, Matrix_ >::merge_policy = MergePolicy::RSS

Policy for choosing the merge order.

◆ num_neighbors

template<typename Index_ , typename Float_ , class Matrix_ = knncolle::Matrix<Index_, Float_>>
int mnncorrect::Options< Index_, Float_, Matrix_ >::num_neighbors = 15

Number of neighbors to use in the various search steps - specifically, identification of MNN pairs and calculation of the centers of mass. It can be interpreted as the lower bound on the number of observations in each "subpopulation".

Larger values improve the stability of the correction by increasing the number of MNN pairs and including more observations in each center of mass. However, this comes at the cost of reduced resolution when matching subpopulations across batches.

◆ num_steps

template<typename Index_ , typename Float_ , class Matrix_ = knncolle::Matrix<Index_, Float_>>
int mnncorrect::Options< Index_, Float_, Matrix_ >::num_steps = 1

Number of steps for the recursive neighbor search to compute the center of mass for each MNN-involved observationc. Larger values mitigate the kissing effect but increase the risk of including inappropriately distant subpopulations into the center of mass.

◆ num_threads

template<typename Index_ , typename Float_ , class Matrix_ = knncolle::Matrix<Index_, Float_>>
int mnncorrect::Options< Index_, Float_, Matrix_ >::num_threads = 1

Number of threads to use. The parallelization scheme is defined by parallelize().


The documentation for this struct was generated from the following file: