12 #ifndef _RD_INFORANKER_H_ 13 #define _RD_INFORANKER_H_ 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);
124 d_biasList.resize(0);
129 if (dp_topBits)
delete[] dp_topBits;
130 if (dp_maskBits)
delete dp_maskBits;
142 void accumulateVotes(
const SparseBitVect &bv,
unsigned int label);
154 double *getTopN(
unsigned int num);
196 void writeTopBitsToStream(std::ostream *outStream)
const;
201 void writeTopBitsToFile(
const std::string &fileName)
const;
260 unsigned int d_classes;
264 VECT_USHORT_VECT d_counts;
266 USHORT_VECT d_clsCount;
270 unsigned int d_nInst;
Pulls in all the BitVect classes.
a class for bit vectors that are sparsely occupied.
#define RDKIT_INFOTHEORY_EXPORT
Class used to rank bits based on a specified measure of infomation.
std::vector< int > INT_VECT
std::vector< USHORT_VECT > VECT_USHORT_VECT
InfoType
the type of measure for information
a class for bit vectors that are densely occupied
InfoBitRanker(unsigned int nBits, unsigned int nClasses, InfoType infoType=InfoBitRanker::ENTROPY)
Constructor.
unsigned int getNumInstances() const
return the number of labelled instances(examples) or fingerprints seen so far
unsigned int getNumClasses() const
return the number of classes
std::vector< RDKit::USHORT > USHORT_VECT