Package tipy :: Module cmbn :: Class ProbabilisticCombiner
[hide private]
[frames] | no frames]

Class ProbabilisticCombiner

source code

object --+    
         |    
  Combiner --+
             |
            ProbabilisticCombiner

Simple combiner which combine suggestions based on their probabilities.

This combiner does not modify the suggestions probabilities. Thus, they are sorted in descending order according to their probabilities.

Class Hierarchy for ProbabilisticCombiner
Class Hierarchy for ProbabilisticCombiner

Nested Classes [hide private]
    Inherited from Combiner
  __metaclass__
Metaclass for defining Abstract Base Classes (ABCs).
Instance Methods [hide private]
 
__init__(self)
ProbabilisticCombiner creator.
source code
prdct.Prediction
combine(self, predictionList)
Combine the suggestions in a single list and sort them.
source code

Inherited from object: __delattr__, __format__, __getattribute__, __hash__, __new__, __reduce__, __reduce_ex__, __repr__, __setattr__, __sizeof__, __str__, __subclasshook__

    Inherited from Combiner
Prediction
filter(self, prediction)
Sort the tokens according to their probabilities.
source code
Class Variables [hide private]
  __abstractmethods__ = frozenset([])
    Inherited from Combiner
  MAX_PROBABILITY = 1.0
  MIN_PROBABILITY = 0.0
  _abc_cache = <_weakrefset.WeakSet object at 0x7f2a42360ed0>
  _abc_negative_cache = <_weakrefset.WeakSet object at 0x7f2a423...
  _abc_negative_cache_version = 39
  _abc_registry = <_weakrefset.WeakSet object at 0x7f2a42360e90>
Properties [hide private]

Inherited from object: __class__

Method Details [hide private]

__init__(self)
(Constructor)

source code 

ProbabilisticCombiner creator.

Overrides: object.__init__

combine(self, predictionList)

source code 

Combine the suggestions in a single list and sort them.

Parameters:
  • predictionList (list) - The list of Prediction instances. Each predictors return a Prediction instance which is added to the list by the PredictorActivator.
Returns: prdct.Prediction
The combined Prediction instance containing every suggestions of every Prediction instances sorted in descending order according to their probabilities.
Overrides: Combiner.combine