11 #ifndef _RD_INFORANKER_H_ 12 #define _RD_INFORANKER_H_ 106 d_dims(nBits), d_classes(nClasses), d_type(infoType) {
108 for (
unsigned int i = 0; i < nClasses; i++) {
110 cCount.resize(d_dims, 0);
111 d_counts.push_back(cCount);
113 d_clsCount.resize(d_classes, 0);
117 d_biasList.resize(0);
123 delete [] dp_topBits;
147 double *
getTopN(
unsigned int num);
238 unsigned int d_classes;
240 VECT_USHORT_VECT d_counts;
241 USHORT_VECT d_clsCount;
244 unsigned int d_nInst;
unsigned int getNumClasses() const
return the number of classes
Pulls in all the BitVect classes.
void setMaskBits(RDKit::INT_VECT &maskBits)
Set the bits to be used as a mask.
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.
a class for bit vectors that are sparsely occupied.
Class used to rank bits based on a specified measure of infomation.
void accumulateVotes(const ExplicitBitVect &bv, unsigned int label)
Accumulate the votes for all the bits turned on in a bit vector.
std::vector< int > INT_VECT
void writeTopBitsToFile(std::string fileName) const
Write the top bits to a file.
std::vector< USHORT_VECT > VECT_USHORT_VECT
InfoType
the type of measure for information
double * getTopN(unsigned int num)
Returns the top n bits ranked by the information metric.
a class for bit vectors that are densely occupied
InfoBitRanker(unsigned int nBits, unsigned int nClasses, InfoType infoType=InfoBitRanker::ENTROPY)
Constructor.
void setBiasList(RDKit::INT_VECT &classList)
Set the classes to which the entropy calculation should be biased.
std::vector< RDKit::USHORT > USHORT_VECT