Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

For filtering probabilistic values you can use the same syntax that you already use for deterministic values. However, the result of the operators differ. In case of discrete probabilistic values the Select operator return returns a tuple with a lower tuple existence probability. 

Lets assume you have an attribute x and that attribute is 1.0 with probability 0.25, 2.0 with probability 0.25, and 3.0 with probability 0.5. The following Select operation will now filter the attribute value such that the resulting attribute value can only be instantiated to 2.0 and the resulting tuple existence is reduced to 0.25.

Code Block
themeEclipse
languagejavascript
titleProbabilistic discrete select
linenumberstrue
filter = SELECT({predicate = RelationalPredicate('x > 1.0 AND x < 3.0')}, probabilistic:datainput)

The filtering of continuous probabilistic distributions is similar to the processing of discrete probabilistic values in the fact that it may reduce the tuple existence probability.

...

Code Block
themeEclipse
languagejavascript
titleProbabilistic continuous select
linenumberstrue
filter = SELECT({predicate = RelationalPredicate('x > 1.0 AND x < 4.0')}, probabilistic:data)input)

Joining probabilistic values

The join with a predicate based on probabilistic discrete values uses the same syntax as for deterministic values. Although it looks similar the result is different in the sense that the Join operator performs a join of the input streams in each possible world and as such the operator may produce more tuple.

Code Block
themeEclipse
languagesql
titleProbabilistic Join
linenumberstrue
Select * From input1,input2 WHERE input1.x=input2.y;

As you can see, the probabilistic processing is not limit to PQL. You can use the same CQL syntax you already used for deterministic values. 

Access to tuple existence

To access the tuple existence during processing you can use the ExistenceToPayload operator that copies the tuple existence to the payload where you can access them with the attribute name "meta_existence".

Code Block
themeEclipse
languagejavascript
titleProbabilistic continuous select
linenumberstrue
filter = ExistenceToPayload(SELECT({predicate = RelationalPredicate('x > 1.0 AND x < 4.0')}, probabilistic:data))
filter = SELECT({predicate = RelationalPredicate('x > 1.0 AND x < 4.0')}, probabilistic:data)