 |
RDKit
Open-source cheminformatics and machine learning.
|
Go to the documentation of this file.
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;
260 unsigned int d_classes;
270 unsigned int d_nInst;
#define RDKIT_INFOTHEORY_EXPORT
std::vector< int > INT_VECT
std::vector< USHORT_VECT > VECT_USHORT_VECT
void accumulateVotes(const SparseBitVect &bv, unsigned int label)
void accumulateVotes(const ExplicitBitVect &bv, unsigned int label)
Accumulate the votes for all the bits turned on in a bit vector.
std::vector< RDKit::USHORT > USHORT_VECT
void writeTopBitsToStream(std::ostream *outStream) const
Write the top N bits to a stream.
double * getTopN(unsigned int num)
Returns the top n bits ranked by the information metric.
a class for bit vectors that are sparsely 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.
Class used to rank bits based on a specified measure of information.
Pulls in all the BitVect classes.
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
InfoType
the type of measure for information
void writeTopBitsToFile(const std::string &fileName) const
Write the top bits to a file.
a class for bit vectors that are densely occupied
void setMaskBits(RDKit::INT_VECT &maskBits)
Set the bits to be used as a mask.