yat  0.20.3pre
Public Member Functions | List of all members
theplu::yat::classifier::InputRanker Class Reference

Class for ranking rows in a matrix, using a Score and a target vector. More...

#include <yat/classifier/InputRanker.h>

Public Member Functions

 InputRanker (const MatrixLookup &, const Target &, const statistics::Score &)
 
 InputRanker (const MatrixLookupWeighted &, const Target &, const statistics::Score &)
 
const std::vector< size_t > & id (void) const
 
const std::vector< size_t > & rank (void) const
 
double score (size_t rank) const
 

Detailed Description

Class for ranking rows in a matrix, using a Score and a target vector.

Constructor & Destructor Documentation

◆ InputRanker() [1/2]

theplu::yat::classifier::InputRanker::InputRanker ( const MatrixLookup ,
const Target ,
const statistics::Score  
)

Constructor taking data, target, a Score object and vector defining what samples to use (default is to use all samples)

◆ InputRanker() [2/2]

theplu::yat::classifier::InputRanker::InputRanker ( const MatrixLookupWeighted ,
const Target ,
const statistics::Score  
)

Constructor taking data, target, a Score object and vector defining what samples to use (default is to use all samples)

Member Function Documentation

◆ id()

const std::vector<size_t>& theplu::yat::classifier::InputRanker::id ( void  ) const

highest ranked gene is ranked as number zero

Returns
id (index) of input ranked as number i

◆ rank()

const std::vector<size_t>& theplu::yat::classifier::InputRanker::rank ( void  ) const

highest ranked gene is ranked as number zero

Returns
rank for id (row) i

◆ score()

double theplu::yat::classifier::InputRanker::score ( size_t  rank) const
Parameters
rankshould be a number in range [0,N-1] where N is number of inputs in data matrix. "score(0)" will gives the score of the feature that had the highest score.
Returns
score of the input that has been been ranked as number rank.

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

Generated on Sat Feb 18 2023 03:31:44 for yat by  doxygen 1.8.14