singlepp
A C++ library for cell type classification
Loading...
Searching...
No Matches
Public Member Functions | List of all members
singlepp::TrainedSingleIntersect< Index_, Float_ > Class Template Reference

Classifier built from an intersection of genes. More...

#include <train_single.hpp>

Public Member Functions

const Markers< Index_ > & get_markers () const
 
const std::vector< Index_ > & get_test_subset () const
 
const std::vector< Index_ > & get_ref_subset () const
 
size_t num_labels () const
 
size_t num_profiles () const
 

Detailed Description

template<typename Index_, typename Float_>
class singlepp::TrainedSingleIntersect< Index_, Float_ >

Classifier built from an intersection of genes.

Instances of this class should not be directly constructed, but instead returned by calling train_single_intersect(). This uses the intersection of genes between the test dataset and those of the reference dataset. Each instance can be used in classify_single_intersect() with a test dataset that has the specified genes.

Template Parameters
Index_Integer type for the row/column indices of the matrix.
Float_Floating-point type for the correlations and scores.

Member Function Documentation

◆ get_markers()

const Markers< Index_ > & singlepp::TrainedSingleIntersect< Index_, Float_ >::get_markers ( ) const
inline
Returns
A vector of vectors of ranked marker genes to be used in the classification. In the innermost vectors, each value is an index into the subset vectors (see get_test_subset() and get_ref_subset()). e.g., get_test_subset()[get_markers()[2][1].front()] is the test matrix row index of the first marker of the third label over the first label. The set of marker genes is a subset of those in the input markers in train_single_intersect().

◆ get_ref_subset()

const std::vector< Index_ > & singlepp::TrainedSingleIntersect< Index_, Float_ >::get_ref_subset ( ) const
inline
Returns
Subset of genes in the intersection for the test dataset. These are unique indices into the ref_id matrix supplied to train_single_intersect(), and can be assumed to represent row indices into the reference matrix. This has the same length as the subset vector returned by get_test_subset(), where corresponding entries refer to the same genes in the respective datasets.

◆ get_test_subset()

const std::vector< Index_ > & singlepp::TrainedSingleIntersect< Index_, Float_ >::get_test_subset ( ) const
inline
Returns
Subset of genes in the intersection for the test dataset. These are unique indices into the test_id array supplied to train_single_intersect(), and can be assumed to represent row indices into the test matrix. This has the same length as the subset vector returned by get_ref_subset(), where corresponding entries refer to the same genes in the respective datasets.

◆ num_labels()

size_t singlepp::TrainedSingleIntersect< Index_, Float_ >::num_labels ( ) const
inline
Returns
Number of labels in this reference.

◆ num_profiles()

size_t singlepp::TrainedSingleIntersect< Index_, Float_ >::num_profiles ( ) const
inline
Returns
Number of profiles in this reference.

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