Package rdkit :: Package ML :: Package NaiveBayes :: Module ClassificationModel :: Class NaiveBayesClassifier
[hide private]
[frames] | no frames]

Class NaiveBayesClassifier

source code

_NaiveBayesClassifier_s can save the following pieces of internal state, accessible via
standard setter/getter functions:

1) _Examples_: a list of examples which have been predicted

2) _TrainingExamples_: List of training examples - the descriptor value of these examples
  are quantized based on info gain using ML/Data/ if necessary

3) _TestExamples_: the list of examples used to test the model

4) _BadExamples_ : list of examples that were incorrectly classified

4) _QBoundVals_: Quant bound values for each varaible - a list of lists

5) _QBounds_ : Number of bounds for each variable

Instance Methods [hide private]
__init__(self, attrs, nPossibleVals, nQuantBounds, mEstimateVal=-1.0, useSigs=False)
source code
GetName(self) source code
SetName(self, name) source code
NameModel(self, varNames) source code
GetExamples(self) source code
SetExamples(self, examples) source code
GetTrainingExamples(self) source code
SetTrainingExamples(self, examples) source code
GetTestExamples(self) source code
SetTestExamples(self, examples) source code
SetBadExamples(self, examples) source code
GetBadExamples(self) source code
_computeQuantBounds(self) source code
We will assume at this point that the training examples have been set
source code
ClassifyExamples(self, examples, appendExamples=0) source code
returns the probability of the last prediction
source code
ClassifyExample(self, example, appendExamples=0)
Classify an example by summing over the conditional probabilities...
source code
Method Details [hide private]


source code 
We will assume at this point that the training examples have been set

We have to estmate the conditional probabilities for each of the (binned) descriptor
component give a outcome (or class). Also the probabilities for each class is estimated

ClassifyExample(self, example, appendExamples=0)

source code 
Classify an example by summing over the conditional probabilities
The most likely class is the one with the largest probability