12#ifndef _RD_INFORANKER_H_
13#define _RD_INFORANKER_H_
112 InfoType infoType = InfoBitRanker::ENTROPY)
113 : d_dims(nBits), d_classes(nClasses), d_type(infoType) {
115 for (
unsigned int i = 0; i < nClasses; i++) {
117 cCount.resize(d_dims, 0);
118 d_counts.push_back(cCount);
120 d_clsCount.resize(d_classes, 0);
123 dp_topBits =
nullptr;
124 d_biasList.resize(0);
125 dp_maskBits =
nullptr;
263 unsigned int d_classes;
273 unsigned int d_nInst;
Pulls in all the BitVect classes.
a class for bit vectors that are densely occupied
void accumulateVotes(const ExplicitBitVect &bv, unsigned int label)
Accumulate the votes for all the bits turned on in a bit vector.
InfoType
the type of measure for information
void setMaskBits(RDKit::INT_VECT &maskBits)
Set the bits to be used as a mask.
void writeTopBitsToFile(const std::string &fileName) const
Write the top bits to a file.
InfoBitRanker(unsigned int nBits, unsigned int nClasses, InfoType infoType=InfoBitRanker::ENTROPY)
Constructor.
unsigned int getNumClasses() const
return the number of classes
void accumulateVotes(const SparseBitVect &bv, unsigned int label)
double * getTopN(unsigned int num)
Returns the top n bits ranked by the information metric.
unsigned int getNumInstances() const
return the number of labelled instances(examples) or fingerprints seen so far
void writeTopBitsToStream(std::ostream *outStream) const
Write the top N bits to a stream.
void setBiasList(RDKit::INT_VECT &classList)
Set the classes to which the entropy calculation should be biased.
a class for bit vectors that are sparsely occupied.
#define RDKIT_INFOTHEORY_EXPORT
Class used to rank bits based on a specified measure of information.
std::vector< RDKit::USHORT > USHORT_VECT
std::vector< USHORT_VECT > VECT_USHORT_VECT
std::vector< int > INT_VECT