singlepp
A C++ library for cell type classification
Loading...
Searching...
No Matches
singlepp::TrainSingleOptions< Index_, Float_, Matrix_ > Struct Template Reference

Options for train_single() and friends. More...

#include <train_single.hpp>

Public Attributes

int top = -1
 
std::shared_ptr< knncolle::Builder< Index_, Float_, Float_, Matrix_ > > trainer
 
int num_threads = 1
 

Detailed Description

template<typename Index_ = DefaultIndex, typename Float_ = DefaultFloat, class Matrix_ = knncolle::Matrix<Index_, Float_>>
struct singlepp::TrainSingleOptions< Index_, Float_, Matrix_ >

Options for train_single() and friends.

Template Parameters
Index_Integer type for the row/column indices of the matrix.
Float_Floating-point type for the correlations and scores.
Matrix_Class of the input data for the neighbor search. This should satisfy the knncolle::Matrix interface.

Member Data Documentation

◆ num_threads

template<typename Index_ = DefaultIndex, typename Float_ = DefaultFloat, class Matrix_ = knncolle::Matrix<Index_, Float_>>
int singlepp::TrainSingleOptions< Index_, Float_, Matrix_ >::num_threads = 1

Number of threads to use. The parallelization scheme is determined by tatami::parallelize().

◆ top

template<typename Index_ = DefaultIndex, typename Float_ = DefaultFloat, class Matrix_ = knncolle::Matrix<Index_, Float_>>
int singlepp::TrainSingleOptions< Index_, Float_, Matrix_ >::top = -1

Number of top markers to use from each pairwise comparison between labels. Larger values improve the stability of the correlations at the cost of increasing noise and computational work.

Setting this to a negative value will instruct train_single() to use all supplied markers. This is useful in situations where the supplied markers have already been curated.

◆ trainer

template<typename Index_ = DefaultIndex, typename Float_ = DefaultFloat, class Matrix_ = knncolle::Matrix<Index_, Float_>>
std::shared_ptr<knncolle::Builder<Index_, Float_, Float_, Matrix_> > singlepp::TrainSingleOptions< Index_, Float_, Matrix_ >::trainer

Algorithm for the nearest-neighbor search. This allows us to skip the explicit calculation of correlations between each test cell and every reference sample. If NULL, this defaults to an exact search based on knncolle::VptreeBuilder.


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