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

Classifier trained from a single reference. More...

#include <train_single.hpp>

Public Member Functions

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

Detailed Description

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

Classifier trained from a single reference.

Instances of this class should not be directly constructed, but instead returned by calling train_single() on a reference dataset. Each instance can be used in classify_single() with a test dataset that has the same number and order of genes as the reference dataset.

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::TrainedSingle< Index_, Float_ >::get_markers ( ) const
inline
Returns
A vector of vectors of vectors of ranked marker genes to be used in the classification. In the innermost vectors, each value is an index into the subset vector (see get_subset()), e.g., get_subset()[get_markers()[2][1].front()] is the row index of the first marker of the third label over the first label. The set of marker genes is a subset of the input markers used in train_single().

◆ get_subset()

const std::vector< Index_ > & singlepp::TrainedSingle< Index_, Float_ >::get_subset ( ) const
inline
Returns
The subset of genes in the test/reference datasets that were used in the classification. Each value is a row index into either matrix.

◆ num_labels()

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

◆ num_profiles()

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

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