nltk.MutableProbDist.update¶
-
MutableProbDist.
update
(sample, prob, log=True)[source]¶ Update the probability for the given sample. This may cause the object to stop being the valid probability distribution - the user must ensure that they update the sample probabilities such that all samples have probabilities between 0 and 1 and that all probabilities sum to one.
Parameters: - sample (any) – the sample for which to update the probability
- prob (float) – the new probability
- log (bool) – is the probability already logged