• Aucun résultat trouvé

Uncertain Data Management Relational Probabilistic Database Models

N/A
N/A
Protected

Academic year: 2022

Partager "Uncertain Data Management Relational Probabilistic Database Models"

Copied!
213
0
0

Texte intégral

(1)

Uncertain Data Management

Relational Probabilistic Database Models

Antoine Amarilli1, Silviu Maniu2 November 28th, 2017

1Télécom ParisTech

2LRI

1/45

(2)

Table of contents

Probabilistic instances TID

BID pc-tables

(3)

Uncertain instances Remember fromlast class:

• Fix a finite set ofpossible tuplesof same arity

• Apossible world: a subset of thepossible tuples

• A (finite)uncertain relation: set ofpossible worlds

U1

date teacher room 04 Silviu C017 04 Antoine C017 04 Antoine C47 11 Silviu C017 11 Silviu C47 11 Antoine C017

U2

date teacher room 04 Silviu C017 04 Antoine C017 04 Antoine C47 11 Silviu C017 11 Silviu C47 11 Antoine C017

(4)

Uncertain instances Remember fromlast class:

• Fix a finite set ofpossible tuplesof same arity

• Apossible world: a subset of thepossible tuples

• A (finite)uncertain relation: set ofpossible worlds U1

date teacher room 04 Silviu C017 04 Antoine C017 04 Antoine C47 11 Silviu C017

U2

date teacher room 04 Silviu C017 04 Antoine C017 04 Antoine C47 11 Silviu C017

(5)

Probabilistic instances

• SupportU: uncertain relation

• Probability distributionπonU:

FunctionfromU to reals in[0,1]

• It mustsum upto1:

I∈Uπ(I) = 1

U1

date teacher room 04 Silviu C017 04 Antoine C017 04 Antoine C47 11 Silviu C017 11 Silviu C47 11 Antoine C017

π(U1) = 0.8

U2

date teacher room 04 Silviu C017 04 Antoine C017 04 Antoine C47 11 Silviu C017 11 Silviu C47 11 Antoine C017

π(U2) = 0.2

(6)

Probabilistic instances

• SupportU: uncertain relation

• Probability distributionπonU:

FunctionfromU to reals in[0,1]

• It mustsum upto1:

I∈Uπ(I) = 1

U1

date teacher room 04 Silviu C017 04 Antoine C017 04 Antoine C47 11 Silviu C017 11 Silviu C47 11 Antoine C017

π(U1) = 0.8

U2

date teacher room 04 Silviu C017 04 Antoine C017 04 Antoine C47 11 Silviu C017 11 Silviu C47 11 Antoine C017

π(U2) = 0.2

(7)

Probabilistic instances

• SupportU: uncertain relation

• Probability distributionπonU:

FunctionfromU to reals in[0,1]

• It mustsum upto1:

I∈Uπ(I) = 1

U1

date teacher room 04 Silviu C017 04 Antoine C017 04 Antoine C47 11 Silviu C017 11 Silviu C47 11 Antoine C017

π(U1) = 0.8

U2

date teacher room 04 Silviu C017 04 Antoine C017 04 Antoine C47 11 Silviu C017 11 Silviu C47 11 Antoine C017

π(U2) = 0.2

(8)

Probabilistic instances

• SupportU: uncertain relation

• Probability distributionπonU:

FunctionfromU to reals in[0,1]

• It mustsum upto1:

I∈Uπ(I) = 1

U1

date teacher room 04 Silviu C017 04 Antoine C017 04 Antoine C47 11 Silviu C017

π(U1) = 0.8

U2

date teacher room 04 Silviu C017 04 Antoine C017 04 Antoine C47 11 Silviu C017

π(U2) = 0.2

(9)

Probabilistic instances

• SupportU: uncertain relation

• Probability distributionπonU:

FunctionfromU to reals in[0,1]

• It mustsum upto1:

I∈Uπ(I) = 1

U1

date teacher room 04 Silviu C017 04 Antoine C017 04 Antoine C47 11 Silviu C017 11 Silviu C47 11 Antoine C017

U2

date teacher room 04 Silviu C017 04 Antoine C017 04 Antoine C47 11 Silviu C017 11 Silviu C47 11 Antoine C017

(10)

What aboutNULLs?

Remember that last time we saw:

• Codd-tablesandv-tablesandc-tables, withNULLs

• Boolean c-tables, withNULLsonly in conditions

Boolean variables

We focus for probabilities on models likeBoolean c-tables

Easier to define probabilities on afinitespace!

(11)

What aboutNULLs?

Remember that last time we saw:

• Codd-tablesandv-tablesandc-tables, withNULLs

• Boolean c-tables, withNULLsonly in conditions

Boolean variables

We focus for probabilities on models likeBoolean c-tables

Easier to define probabilities on afinitespace!

(12)

Relational algebra on uncertain instances Remember fromlast class:

• Extend relational algebra operators touncertain instances

• Thepossible worldsof theresultshould be...

• take allpossible worldsin the supports of the inputs

• apply the operation and get thepossible outputs

U1

04 S. C017 11 S. C47

U2

11 A. C017

V1

V2

11 A. C017

=

04 S. C017 11 S. C47 04 S. C017 11 S. C47 11 A. C017 11 A. C017

(13)

Relational algebra on uncertain instances Remember fromlast class:

• Extend relational algebra operators touncertain instances

• Thepossible worldsof theresultshould be...

• take allpossible worldsin the supports of the inputs

• apply the operation and get thepossible outputs

U1

04 S. C017 11 S. C47

U2

11 A. C017

V1

V2

11 A. C017

=

04 S. C017 11 S. C47 04 S. C017 11 S. C47 11 A. C017 11 A. C017

(14)

Relational algebra on uncertain instances Remember fromlast class:

• Extend relational algebra operators touncertain instances

• Thepossible worldsof theresultshould be...

• take allpossible worldsin the supports of the inputs

• apply the operation and get thepossible outputs

U1

04 S. C017

11 S. C47

V1

V2

11 A. C017

=

04 S. C017 11 S. C47 04 S. C017 11 S. C47 11 A. C017 11 A. C017

(15)

Relational algebra on uncertain instances Remember fromlast class:

• Extend relational algebra operators touncertain instances

• Thepossible worldsof theresultshould be...

• take allpossible worldsin the supports of the inputs

• apply the operation and get thepossible outputs

U1

04 S. C017 11 S. C47

U2

11 A. C017

V1

V2

11 A. C017

=

04 S. C017 11 S. C47 04 S. C017 11 S. C47 11 A. C017 11 A. C017

(16)

Relational algebra on uncertain instances Remember fromlast class:

• Extend relational algebra operators touncertain instances

• Thepossible worldsof theresultshould be...

• take allpossible worldsin the supports of the inputs

• apply the operation and get thepossible outputs

U1

04 S. C017

11 S. C47

V1

V

=

04 S. C017 11 S. C47 04 S. C017 11 S. C47 11 A. C017 11 A. C017

(17)

Relational algebra on uncertain instances Remember fromlast class:

• Extend relational algebra operators touncertain instances

• Thepossible worldsof theresultshould be...

• take allpossible worldsin the supports of the inputs

• apply the operation and get thepossible outputs

U1

04 S. C017 11 S. C47

U2

11 A. C017

V1

V2

11 A. C017

=

04 S. C017 11 S. C47 04 S. C017 11 S. C47 11 A. C017 11 A. C017

(18)

Relational algebra on probabilistic instances

• Let’s adapt relational algebra toprobabilistic instances

• Thepossible worldsof theresultshould be...

• take allpossible worldsof the inputs

• apply the operation and get apossible output

• Theprobabilityof each possible world should be...

• considerall input possible worldsthat give it

• sum up theirprobabilities

(19)

Relational algebra on probabilistic instances

• Let’s adapt relational algebra toprobabilistic instances

• Thepossible worldsof theresultshould be...

• take allpossible worldsof the inputs

• apply the operation and get apossible output

• Theprobabilityof each possible world should be...

• considerall input possible worldsthat give it

• sum up theirprobabilities

(20)

Relational algebra on probabilistic instances

• Let’s adapt relational algebra toprobabilistic instances

• Thepossible worldsof theresultshould be...

• take allpossible worldsof the inputs

• apply the operation and get apossible output

• Theprobabilityof each possible world should be...

• considerall input possible worldsthat give it

• sum up theirprobabilities

(21)

Example of relational algebra on probabilistic instances

U1

04 S. C017 11 S. C47

π(U1) = 0.8

U2

11 A. C017

π(U2) = 0.2

V1

π(V1) = 0.9

V2

11 A. C017

π(V2) = 0.1

=

W1

04 S. C017 11 S. C47

π(W1) = 0.8×0.9

W2

04 S. C017 11 S. C47 11 A. C017

π(W2) = 0.8×0.1

W3

11 A. C017

π(W3) = 0.2×0.9 +0.2×0.1

(22)

Example of relational algebra on probabilistic instances

U1

04 S. C017 11 S. C47

π(U1) = 0.8

U2

11 A. C017

π(U2) = 0.2

V1

π(V1) = 0.9

V2

11 A. C017

π(V2) = 0.1

=

W1

04 S. C017 11 S. C47

π(W1) = 0.8×0.9

W2

04 S. C017 11 S. C47 11 A. C017

π(W2) = 0.8×0.1

W3

11 A. C017

π(W3) = 0.2×0.9 +0.2×0.1

(23)

Example of relational algebra on probabilistic instances

U1

04 S. C017 11 S. C47

π(U1) = 0.8

U2

11 A. C017

π(U2) = 0.2

V1

π(V1) = 0.9

V2

11 A. C017

π(V2) = 0.1

=

W1

04 S. C017 11 S. C47

π(W1) = 0.8×0.9

W2

04 S. C017 11 S. C47 11 A. C017

π(W2) = 0.8×0.1

W3

11 A. C017

π(W3) = 0.2×0.9 +0.2×0.1

(24)

Example of relational algebra on probabilistic instances

U1

04 S. C017 11 S. C47

π(U1) = 0.8

U2

11 A. C017

π(U2) = 0.2

V1

π(V1) = 0.9

V2

11 A. C017

π(V2) = 0.1

=

W1

04 S. C017 11 S. C47

π(W1) = 0.8×0.9

W2

04 S. C017 11 S. C47 11 A. C017

π(W2) = 0.8×0.1

W3

11 A. C017

π(W3) = 0.2×0.9 +0.2×0.1

(25)

Example of relational algebra on probabilistic instances

U1

04 S. C017 11 S. C47

π(U1) = 0.8

U2

11 A. C017 π(U2) = 0.2

V1

π(V1) = 0.9

V2

11 A. C017 π(V2) = 0.1

=

W1

04 S. C017 11 S. C47

π(W1) = 0.8×0.9

W2

04 S. C017 11 S. C47 11 A. C017

π(W2) = 0.8×0.1

W3

11 A. C017

π(W3) = 0.2×0.9 +0.2×0.1

(26)

Example of relational algebra on probabilistic instances

U1

04 S. C017 11 S. C47

π(U1) = 0.8

U2

11 A. C017 π(U ) = 0.2

V1

π(V1) = 0.9

V2

11 A. C017 π(V2) = 0.1

=

W1

04 S. C017 11 S. C47

π(W1) = 0.8×0.9

W2

04 S. C017 11 S. C47 11 A. C017

π(W2) = 0.8×0.1

W3

11 A. C017

π(W3) = 0.2×0.9 +0.2×0.1

(27)

Example of relational algebra on probabilistic instances

U1

04 S. C017 11 S. C47

π(U1) = 0.8

U2

11 A. C017 π(U2) = 0.2

V1

π(V1) = 0.9

V2

11 A. C017 π(V2) = 0.1

=

W1

04 S. C017 11 S. C47

π(W1) = 0.8×0.9 W2

04 S. C017 11 S. C47 11 A. C017

π(W2) = 0.8×0.1

W3

11 A. C017

π(W3) = 0.2×0.9 +0.2×0.1

(28)

Example of relational algebra on probabilistic instances

U1

04 S. C017 11 S. C47

π(U1) = 0.8

U2

11 A. C017 π(U ) = 0.2

V1

π(V1) = 0.9

V2

11 A. C017 π(V2) = 0.1

=

W1

04 S. C017 11 S. C47

π(W1) = 0.8×0.9

W2

04 S. C017 11 S. C47 11 A. C017

π(W2) = 0.8×0.1 W3

11 A. C017

π(W3) = 0.2×0.9 +0.2×0.1

(29)

Example of relational algebra on probabilistic instances

U1

04 S. C017 11 S. C47

π(U1) = 0.8

U2

11 A. C017 π(U2) = 0.2

V1

π(V1) = 0.9

V2

11 A. C017 π(V2) = 0.1

=

W1

04 S. C017 11 S. C47

π(W1) = 0.8×0.9

W2

04 S. C017 11 S. C47 11 A. C017

π(W2) = 0.8×0.1

W3

11 A. C017

π(W3) = 0.2×0.9 +0.2×0.1

(30)

Example of relational algebra on probabilistic instances

U1

04 S. C017 11 S. C47

π(U1) = 0.8

U2

11 A. C017 π(U ) = 0.2

V1

π(V1) = 0.9

V2

11 A. C017 π(V2) = 0.1

=

W1

04 S. C017 11 S. C47 π(W1) = 0.8×0.9

W2

04 S. C017 11 S. C47 11 A. C017

π(W2) = 0.8×0.1

W3

π(W3) = 0.2×0.9 +0.2×0.1

(31)

Example of relational algebra on probabilistic instances

U1

04 S. C017 11 S. C47

π(U1) = 0.8

U2

11 A. C017 π(U2) = 0.2

V1

π(V1) = 0.9

V2

11 A. C017 π(V2) = 0.1

=

W1

04 S. C017 11 S. C47 π(W1) = 0.8×0.9

W2

04 S. C017 11 S. C47 11 A. C017 π(W2) = 0.8×0.1

W3

11 A. C017

π(W3) = 0.2×0.9 +0.2×0.1

(32)

Example of relational algebra on probabilistic instances

U1

04 S. C017 11 S. C47

π(U1) = 0.8

U2

11 A. C017 π(U ) = 0.2

V1

π(V1) = 0.9

V2

11 A. C017 π(V2) = 0.1

=

W1

04 S. C017 11 S. C47 π(W1) = 0.8×0.9

W2

04 S. C017 11 S. C47 11 A. C017 π(W2) = 0.8×0.1

W3

+0.2×0.1

(33)

Example of relational algebra on probabilistic instances

U1

04 S. C017 11 S. C47

π(U1) = 0.8

U2

11 A. C017 π(U2) = 0.2

V1

π(V1) = 0.9

V2

11 A. C017 π(V2) = 0.1

=

W1

04 S. C017 11 S. C47 π(W1) = 0.8×0.9

W2

04 S. C017 11 S. C47 11 A. C017 π(W2) = 0.8×0.1

W3

11 A. C017 π(W3) = 0.2×0.9

(34)

Representation system

• Remember that if we haveNpossible tuples

there are2Npossible instances

there are22N possible uncertain instances

writing outan uncertain instance isexponential

Last time we sawBoolean c-tablesas aconcise way torepresentuncertain instances

• Forprobabilistic instances:

there areinfinitely manypossible instances

writing outa probabilistic instance is stillexponential

How torepresentprobabilistic instances?

(35)

Representation system

• Remember that if we haveNpossible tuples

there are2Npossible instances

there are22N possible uncertain instances

writing outan uncertain instance isexponential

Last time we sawBoolean c-tablesas aconcise way torepresentuncertain instances

• Forprobabilistic instances:

there areinfinitely manypossible instances

writing outa probabilistic instance is stillexponential

How torepresentprobabilistic instances?

(36)

Representation system

• Remember that if we haveNpossible tuples

there are2Npossible instances

there are22N possible uncertain instances

writing outan uncertain instance isexponential

Last time we sawBoolean c-tablesas aconcise way torepresentuncertain instances

• Forprobabilistic instances:

there areinfinitely manypossible instances

writing outa probabilistic instance is stillexponential

How torepresentprobabilistic instances?

(37)

Representation system

• Remember that if we haveNpossible tuples

there are2Npossible instances

there are22N possible uncertain instances

writing outan uncertain instance isexponential

Last time we sawBoolean c-tablesas aconcise way torepresentuncertain instances

• Forprobabilistic instances:

there areinfinitely manypossible instances

writing outa probabilistic instance is stillexponential

How torepresentprobabilistic instances?

(38)

Representation system

• Remember that if we haveNpossible tuples

there are2Npossible instances

there are22N possible uncertain instances

writing outan uncertain instance isexponential

Last time we sawBoolean c-tablesas aconcise way torepresentuncertain instances

• Forprobabilistic instances:

there areinfinitely manypossible instances

writing outa probabilistic instance is stillexponential

How torepresentprobabilistic instances?

(39)

Representation system

• Remember that if we haveNpossible tuples

there are2Npossible instances

there are22N possible uncertain instances

writing outan uncertain instance isexponential

Last time we sawBoolean c-tablesas aconcise way torepresentuncertain instances

• Forprobabilistic instances:

there areinfinitely manypossible instances

writing outa probabilistic instance is stillexponential

How torepresentprobabilistic instances?

(40)

Representation system

• Remember that if we haveNpossible tuples

there are2Npossible instances

there are22N possible uncertain instances

writing outan uncertain instance isexponential

Last time we sawBoolean c-tablesas aconcise way torepresentuncertain instances

• Forprobabilistic instances:

there areinfinitely manypossible instances

writing outa probabilistic instance is stillexponential

(41)

Table of contents

Probabilistic instances

TID BID pc-tables Conclusion

(42)

Tuple-independent databases

• Thesimplestmodel: tuple-independent databases

• Annotate eachinstance factwith aprobability

U

date teacher room 04 Silviu C017

0.8

04 Antoine C017

0.2

11 Silviu C017

1

Assumeindependencebetween tuples

(Silviu and Antoine may teach at the same time)

(43)

Tuple-independent databases

• Thesimplestmodel: tuple-independent databases

• Annotate eachinstance factwith aprobability U

date teacher room 04 Silviu C017

0.8

04 Antoine C017

0.2

11 Silviu C017

1

Assumeindependencebetween tuples

(Silviu and Antoine may teach at the same time)

(44)

Tuple-independent databases

• Thesimplestmodel: tuple-independent databases

• Annotate eachinstance factwith aprobability U

date teacher room 04 Silviu C017 0.8 04 Antoine C017 0.2 11 Silviu C017 1

Assumeindependencebetween tuples

(Silviu and Antoine may teach at the same time)

(45)

Tuple-independent databases

• Thesimplestmodel: tuple-independent databases

• Annotate eachinstance factwith aprobability U

date teacher room 04 Silviu C017 0.8 04 Antoine C017 0.2 11 Silviu C017 1

Assumeindependencebetween tuples

(Silviu and Antoine may teach at the same time)

(46)

Semantics of TID

• Each tuple iskeptordiscardedwith the probability

• Probabilistic choices areindependentacross tuples

U

date teacher room 04 Silviu C017 0.8 04 Antoine C017 0.2 11 Silviu C017 1

U

date teacher room 04 Silviu C017 04 Antoine C017 11 Silviu C017 What’s theprobabilityof this outcome?

0.8×(10.2)×1

(47)

Semantics of TID

• Each tuple iskeptordiscardedwith the probability

• Probabilistic choices areindependentacross tuples U

date teacher room 04 Silviu C017 0.8 04 Antoine C017 0.2 11 Silviu C017 1

U

date teacher room 04 Silviu C017 04 Antoine C017 11 Silviu C017 What’s theprobabilityof this outcome?

0.8×(10.2)×1

(48)

Semantics of TID

• Each tuple iskeptordiscardedwith the probability

• Probabilistic choices areindependentacross tuples U

date teacher room 04 Silviu C017 0.8 04 Antoine C017 0.2 11 Silviu C017 1

U

date teacher room

04 Silviu C017 04 Antoine C017 11 Silviu C017 What’s theprobabilityof this outcome?

0.8×(10.2)×1

(49)

Semantics of TID

• Each tuple iskeptordiscardedwith the probability

• Probabilistic choices areindependentacross tuples U

date teacher room 04 Silviu C017 0.8 04 Antoine C017 0.2 11 Silviu C017 1

U

date teacher room 04 Silviu C017

04 Antoine C017 11 Silviu C017 What’s theprobabilityof this outcome?

0.8×(10.2)×1

(50)

Semantics of TID

• Each tuple iskeptordiscardedwith the probability

• Probabilistic choices areindependentacross tuples U

date teacher room 04 Silviu C017 0.8 04 Antoine C017 0.2 11 Silviu C017 1

U

date teacher room 04 Silviu C017 04 Antoine C017

11 Silviu C017 What’s theprobabilityof this outcome?

0.8×(10.2)×1

(51)

Semantics of TID

• Each tuple iskeptordiscardedwith the probability

• Probabilistic choices areindependentacross tuples U

date teacher room 04 Silviu C017 0.8 04 Antoine C017 0.2 11 Silviu C017 1

U

date teacher room 04 Silviu C017 04 Antoine C017 11 Silviu C017

What’s theprobabilityof this outcome?

0.8×(10.2)×1

(52)

Semantics of TID

• Each tuple iskeptordiscardedwith the probability

• Probabilistic choices areindependentacross tuples U

date teacher room 04 Silviu C017 0.8 04 Antoine C017 0.2 11 Silviu C017 1

U

date teacher room 04 Silviu C017 04 Antoine C017 11 Silviu C017 What’s theprobabilityof this outcome?

0.8×(10.2)×1

(53)

Semantics of TID

• Each tuple iskeptordiscardedwith the probability

• Probabilistic choices areindependentacross tuples U

date teacher room 04 Silviu C017 0.8 04 Antoine C017 0.2 11 Silviu C017 1

U

date teacher room 04 Silviu C017 04 Antoine C017 11 Silviu C017 What’s theprobabilityof this outcome?

0.8

×(10.2)×1

(54)

Semantics of TID

• Each tuple iskeptordiscardedwith the probability

• Probabilistic choices areindependentacross tuples U

date teacher room 04 Silviu C017 0.8 04 Antoine C017 0.2 11 Silviu C017 1

U

date teacher room 04 Silviu C017 04 Antoine C017 11 Silviu C017 What’s theprobabilityof this outcome?

(10.2)×1

(55)

Semantics of TID

• Each tuple iskeptordiscardedwith the probability

• Probabilistic choices areindependentacross tuples U

date teacher room 04 Silviu C017 0.8 04 Antoine C017 0.2 11 Silviu C017 1

U

date teacher room 04 Silviu C017 04 Antoine C017 11 Silviu C017 What’s theprobabilityof this outcome?

0.8×(10.2)

×1

(56)

Semantics of TID

• Each tuple iskeptordiscardedwith the probability

• Probabilistic choices areindependentacross tuples U

date teacher room 04 Silviu C017 0.8 04 Antoine C017 0.2 11 Silviu C017 1

U

date teacher room 04 Silviu C017 04 Antoine C017 11 Silviu C017 What’s theprobabilityof this outcome?

(57)

Getting a probability distribution

Thesemanticsof a TID instance is aprobabilistic instance...

thepossible worldsare the subsets

always keeping tuples withprobability 1 Formally, for a TID instanceI, theprobabilityofJ:

• we must haveJ⊆I

• product ofptfor each tupletkeptinJ

• product of1−ptfor each tupletnot keptinJ

(58)

Getting a probability distribution

Thesemanticsof a TID instance is aprobabilistic instance...

thepossible worldsare the subsets

always keeping tuples withprobability 1

Formally, for a TID instanceI, theprobabilityofJ:

• we must haveJ⊆I

• product ofptfor each tupletkeptinJ

• product of1−ptfor each tupletnot keptinJ

(59)

Getting a probability distribution

Thesemanticsof a TID instance is aprobabilistic instance...

thepossible worldsare the subsets

always keeping tuples withprobability 1 Formally, for a TID instanceI, theprobabilityofJ:

• we must haveJ⊆I

• product ofptfor each tupletkeptinJ

• product of1−ptfor each tupletnot keptinJ

(60)

Getting a probability distribution

Thesemanticsof a TID instance is aprobabilistic instance...

thepossible worldsare the subsets

always keeping tuples withprobability 1 Formally, for a TID instanceI, theprobabilityofJ:

• we must haveJ⊆I

• product ofpt for each tupletkeptinJ

• product of1−p for each tupletnot keptinJ

(61)

Is it a probability distribution?

Do the probabilities alwayssum to 1?

• LetNbe thenumber of tuples

• There are2Npossible worlds

• They are all products ofpior1−pifor each1≤i≤N

This the result ofexpandingthe expression:

(p1+ (1−p1))× · · · ×(pn+ (1−pn))

• All factors areequal to1, so the probabilitiessum to1

(62)

Strong representation system

Remember fromlast class:

Uncertain instance: set of possible worlds

Uncertainty framework: concise way to represent uncertain instances Query language: here, relational algebra Definition (Strong representation system) For any query in the language,

on uncertain instances represented in the framework, the uncertain instance obtained by evaluating the query can also be represented in the framework

Are TID instances astrong representation system?

(63)

Strong representation system

Remember fromlast class:

Uncertain instance: set of possible worlds Uncertainty framework: concise way to represent

uncertain instances

Query language: here, relational algebra Definition (Strong representation system) For any query in the language,

on uncertain instances represented in the framework, the uncertain instance obtained by evaluating the query can also be represented in the framework

Are TID instances astrong representation system?

(64)

Strong representation system

Remember fromlast class:

Uncertain instance: set of possible worlds Uncertainty framework: concise way to represent

uncertain instances Query language: here, relational algebra

Definition (Strong representation system) For any query in the language,

on uncertain instances represented in the framework, the uncertain instance obtained by evaluating the query can also be represented in the framework

Are TID instances astrong representation system?

(65)

Strong representation system

Remember fromlast class:

Uncertain instance: set of possible worlds Uncertainty framework: concise way to represent

uncertain instances Query language: here, relational algebra Definition (Strong representation system) For any query in the language,

on uncertain instances represented in the framework, the uncertain instance obtained by evaluating the query can also be represented in the framework

Are TID instances astrong representation system?

(66)

Strong representation system

Remember fromlast class:

Uncertain instance: set of possible worlds Uncertainty framework: concise way to represent

uncertain instances Query language: here, relational algebra Definition (Strong representation system) For any query in the language,

on uncertain instances represented in the framework,

the uncertain instance obtained by evaluating the query can also be represented in the framework

Are TID instances astrong representation system?

(67)

Strong representation system

Remember fromlast class:

Uncertain instance: set of possible worlds Uncertainty framework: concise way to represent

uncertain instances Query language: here, relational algebra Definition (Strong representation system) For any query in the language,

on uncertain instances represented in the framework, the uncertain instance obtained by evaluating the query

can also be represented in the framework

Are TID instances astrong representation system?

(68)

Strong representation system

Remember fromlast class:

Uncertain instance: set of possible worlds Uncertainty framework: concise way to represent

uncertain instances Query language: here, relational algebra Definition (Strong representation system) For any query in the language,

on uncertain instances represented in the framework, the uncertain instance obtained by evaluating the query

Are TID instances astrong representation system?

(69)

Strong representation system

Remember fromlast class:

Uncertain instance: set of possible worlds Uncertainty framework: concise way to represent

uncertain instances Query language: here, relational algebra Definition (Strong representation system) For any query in the language,

on uncertain instances represented in the framework, the uncertain instance obtained by evaluating the query can also be represented in the framework

Are TID instances astrong representation system?

(70)

Implementing select

U

date teacher room 04 Silviu C47 0.8 04 Antoine C47 0.2

11 Silviu C47 1

σteacher=“Silviu”(U) date teacher room 04 Silviu C47 0.8

11 Silviu C47 1

Is thiscorrect? ... So far,so good.

(71)

Implementing select

U

date teacher room 04 Silviu C47 0.8 04 Antoine C47 0.2

11 Silviu C47 1

σteacher=“Silviu”(U) date teacher room

04 Silviu C47 0.8

11 Silviu C47 1

Is thiscorrect? ... So far,so good.

(72)

Implementing select

U

date teacher room 04 Silviu C47 0.8 04 Antoine C47 0.2

11 Silviu C47 1

σteacher=“Silviu”(U) date teacher room 04 Silviu C47 0.8

11 Silviu C47 1

Is thiscorrect? ... So far,so good.

(73)

Implementing select

U

date teacher room 04 Silviu C47 0.8 04 Antoine C47 0.2

11 Silviu C47 1

σteacher=“Silviu”(U) date teacher room 04 Silviu C47 0.8

11 Silviu C47 1

Is thiscorrect? ...

So far,so good.

(74)

Implementing select

U

date teacher room 04 Silviu C47 0.8 04 Antoine C47 0.2

11 Silviu C47 1

σteacher=“Silviu”(U) date teacher room 04 Silviu C47 0.8

11 Silviu C47 1

(75)

Implementing project

U

date teacher room 04 Silviu C47 0.8 04 Antoine C47 0.2

11 Silviu C47 1

11 Antoine C47 0.1 18 Silviu C47 0.9

πdate(U) date

04

1(10.2)×(10.8)

11

1

18

0.9

Is thiscorrect? ... So far,so good.

(76)

Implementing project

U

date teacher room 04 Silviu C47 0.8 04 Antoine C47 0.2

11 Silviu C47 1

11 Antoine C47 0.1 18 Silviu C47 0.9

πdate(U) date

04

1(10.2)×(10.8)

11

1

18

0.9

Is thiscorrect? ... So far,so good.

(77)

Implementing project

U

date teacher room 04 Silviu C47 0.8 04 Antoine C47 0.2

11 Silviu C47 1

11 Antoine C47 0.1 18 Silviu C47 0.9

πdate(U) date

04

1(10.2)×(10.8)

11

1

18

0.9

Is thiscorrect? ... So far,so good.

(78)

Implementing project

U

date teacher room 04 Silviu C47 0.8 04 Antoine C47 0.2

11 Silviu C47 1

11 Antoine C47 0.1 18 Silviu C47 0.9

πdate(U) date

04

1(10.2)×(10.8) 1

Is thiscorrect? ... So far,so good.

(79)

Implementing project

U

date teacher room 04 Silviu C47 0.8 04 Antoine C47 0.2

11 Silviu C47 1

11 Antoine C47 0.1 18 Silviu C47 0.9

πdate(U) date

04

1(10.2)×(10.8)

11 1

18 0.9

Is thiscorrect? ... So far,so good.

(80)

Implementing project

U

date teacher room 04 Silviu C47 0.8 04 Antoine C47 0.2

11 Silviu C47 1

11 Antoine C47 0.1 18 Silviu C47 0.9

πdate(U) date

04 1(10.2)×(10.8)

Is thiscorrect? ... So far,so good.

(81)

Implementing project

U

date teacher room 04 Silviu C47 0.8 04 Antoine C47 0.2

11 Silviu C47 1

11 Antoine C47 0.1 18 Silviu C47 0.9

πdate(U) date

04 1(10.2)×(10.8)

11 1

18 0.9

So far,so good.

(82)

Implementing project

U

date teacher room 04 Silviu C47 0.8 04 Antoine C47 0.2

11 Silviu C47 1

11 Antoine C47 0.1 18 Silviu C47 0.9

πdate(U) date

04 1(10.2)×(10.8) 11

(83)

Implementing join

... OR NOT!

U

date teacher room 04 Silviu C47 0.8 04 Antoine C47 0.2

Repair room cause C47 leopard0.1

U▷◁Repair date teacher room cause 04 Silviu C47 leopard

0.8×0.1

04 Antoine C47 leopard

0.2×0.1

Is thiscorrect?

It’sWRONG!

(84)

Implementing join

... OR NOT!

U

date teacher room 04 Silviu C47 0.8 04 Antoine C47 0.2

Repair room cause C47 leopard0.1

U▷◁Repair date teacher room cause 04 Silviu C47 leopard

0.8×0.1

04 Antoine C47 leopard

0.2×0.1

Is thiscorrect?

It’sWRONG!

(85)

Implementing join

... OR NOT!

U

date teacher room 04 Silviu C47 0.8 04 Antoine C47 0.2

Repair room cause C47 leopard0.1

U▷◁Repair date teacher room cause

04 Silviu C47 leopard

0.8×0.1

04 Antoine C47 leopard

0.2×0.1

Is thiscorrect?

It’sWRONG!

(86)

Implementing join

... OR NOT!

U

date teacher room 04 Silviu C47 0.8 04 Antoine C47 0.2

Repair room cause C47 leopard0.1

U▷◁Repair date teacher room cause 04 Silviu C47 leopard

0.8×0.1

04 Antoine C47 leopard

0.2×0.1

Is thiscorrect?

It’sWRONG!

(87)

Implementing join

... OR NOT!

U

date teacher room 04 Silviu C47 0.8 04 Antoine C47 0.2

Repair room cause C47 leopard0.1

U▷◁Repair date teacher room cause

04 Silviu C47 leopard 0.8×0.1 04 Antoine C47 leopard 0.2×0.1

Is thiscorrect?

It’sWRONG!

(88)

Implementing join

... OR NOT!

U

date teacher room 04 Silviu C47 0.8 04 Antoine C47 0.2

Repair room cause C47 leopard0.1

U▷◁Repair date teacher room cause

04 Silviu C47 leopard 0.8×0.1 04 Antoine C47 leopard 0.2×0.1

It’sWRONG!

(89)

Implementing join ... OR NOT!

U

date teacher room 04 Silviu C47 0.8 04 Antoine C47 0.2

Repair room cause C47 leopard0.1

U▷◁Repair date teacher room cause

04 Silviu C47 leopard 0.8×0.1 04 Antoine C47 leopard 0.2×0.1

Is thiscorrect?

It’sWRONG!

(90)

Why is it wrong?

U

date teacher room

04 Silviu C47 1

04 Antoine C47 1

Repair room cause

C47 leopard 1/2

U▷◁Repair date teacher room cause 04 Silviu C47 leopard

1/2

04 Antoine C47 leopard

1/2

The two tuples arenot independent!

The first is thereiffthe second is there.

(91)

Why is it wrong?

U

date teacher room

04 Silviu C47 1

04 Antoine C47 1

Repair room cause

C47 leopard 1/2

U▷◁Repair date teacher room cause 04 Silviu C47 leopard

1/2

04 Antoine C47 leopard

1/2

The two tuples arenot independent!

The first is thereiffthe second is there.

(92)

Why is it wrong?

U

date teacher room

04 Silviu C47 1

04 Antoine C47 1

Repair room cause

C47 leopard 1/2

U▷◁Repair date teacher room cause 04 Silviu C47 leopard

1/2

04 Antoine C47 leopard

1/2

The two tuples arenot independent!

The first is thereiffthe second is there.

(93)

Why is it wrong?

U

date teacher room

04 Silviu C47 1

04 Antoine C47 1

Repair room cause

C47 leopard 1/2

U▷◁Repair date teacher room cause

04 Silviu C47 leopard 1/2 04 Antoine C47 leopard 1/2

The two tuples arenot independent!

The first is thereiffthe second is there.

(94)

Why is it wrong?

U

date teacher room

04 Silviu C47 1

04 Antoine C47 1

Repair room cause

C47 leopard 1/2

U▷◁Repair date teacher room cause

04 Silviu C47 leopard 1/2 04 Antoine C47 leopard 1/2

(95)

Why does it matter?

U▷◁Repair date teacher room cause

04 Silviu C47 leopard 1/2 04 Antoine C47 leopard 1/2

πroom(U▷◁Repair) room

C47 1(11/2)×(11/2)

Probability of3/4...

But the leopard had probability1/2!

(96)

Why does it matter?

U▷◁Repair date teacher room cause

04 Silviu C47 leopard 1/2 04 Antoine C47 leopard 1/2

πroom(U▷◁Repair) room

C47

1(11/2)×(11/2)

Probability of3/4...

But the leopard had probability1/2!

(97)

Why does it matter?

U▷◁Repair date teacher room cause

04 Silviu C47 leopard 1/2 04 Antoine C47 leopard 1/2

πroom(U▷◁Repair) room

C47 1(11/2)×(11/2)

Probability of3/4...

But the leopard had probability1/2!

(98)

Why does it matter?

U▷◁Repair date teacher room cause

04 Silviu C47 leopard 1/2 04 Antoine C47 leopard 1/2

πroom(U▷◁Repair) room

C47 1(11/2)×(11/2)

But the leopard had probability1/2!

(99)

Why does it matter?

U▷◁Repair date teacher room cause

04 Silviu C47 leopard 1/2 04 Antoine C47 leopard 1/2

πroom(U▷◁Repair) room

C47 1(11/2)×(11/2)

Probability of3/4...

But the leopard had probability1/2!

(100)

TID are not a strong representation system

• Remember howCodd tablesrequirednamed nulls?

• The result of a query on TID maynotbe a TID

We will see that the correlations can becomplex

• How toevaluatequeries on a TID then?

List allpossible worldsand count the probabilities

(101)

TID are not a strong representation system

• Remember howCodd tablesrequirednamed nulls?

• The result of a query on TID maynotbe a TID

We will see that the correlations can becomplex

• How toevaluatequeries on a TID then?

List allpossible worldsand count the probabilities

(102)

Query evaluation done right

U

date teacher room 04 Silviu C47 0.8 04 Antoine C47 0.2

Repair room cause C47 leopard0.1

πroom(U×Repair) room

C47

• Eitherthere is no leopard and then no result...

• Orthere is a leopard and then...

Non-empty result: 1(10.8)×(10.2) = 0.84

• Thequery probabilityis: 0.1×0.84

(103)

Query evaluation done right

U

date teacher room 04 Silviu C47 0.8 04 Antoine C47 0.2

Repair room cause C47 leopard0.1

πroom(U×Repair) room

C47

• Eitherthere is no leopard and then no result...

• Orthere is a leopard and then...

Non-empty result: 1(10.8)×(10.2) = 0.84

• Thequery probabilityis: 0.1×0.84

(104)

Query evaluation done right

U

date teacher room 04 Silviu C47 0.8 04 Antoine C47 0.2

Repair room cause C47 leopard0.1

πroom(U×Repair) room

C47

• Eitherthere is no leopard and then no result...

• Orthere is a leopard and then...

Non-empty result: 1(10.8)×(10.2) = 0.84

• Thequery probabilityis: 0.1×0.84

(105)

Query evaluation done right

U

date teacher room 04 Silviu C47 0.8 04 Antoine C47 0.2

Repair room cause C47 leopard0.1

πroom(U×Repair) room

C47 ???

• Eitherthere is no leopard and then no result...

• Orthere is a leopard and then...

Non-empty result: 1(10.8)×(10.2) = 0.84

• Thequery probabilityis: 0.1×0.84

(106)

Query evaluation done right

U

date teacher room 04 Silviu C47 0.8 04 Antoine C47 0.2

Repair room cause C47 leopard0.1

πroom(U×Repair) room

C47 ???

• Eitherthere is no leopard and then no result...

• Orthere is a leopard and then...

Non-empty result: 1(10.8)×(10.2) = 0.84

• Thequery probabilityis: 0.1×0.84

(107)

Query evaluation done right

U

date teacher room 04 Silviu C47 0.8 04 Antoine C47 0.2

Repair room cause C47 leopard0.1

πroom(U×Repair) room

C47 ???

• Eitherthere is no leopard and then no result...

• Orthere is a leopard and then...

Non-empty result: 1(10.8)×(10.2) = 0.84

• Thequery probabilityis: 0.1×0.84

(108)

Query evaluation done right

U

date teacher room 04 Silviu C47 0.8 04 Antoine C47 0.2

Repair room cause C47 leopard0.1

πroom(U×Repair) room

C47 ???

• Eitherthere is no leopard and then no result...

1(10.8)×(10.2) = 0.84

• Thequery probabilityis: 0.1×0.84

(109)

Query evaluation done right

U

date teacher room 04 Silviu C47 0.8 04 Antoine C47 0.2

Repair room cause C47 leopard0.1

πroom(U×Repair) room

C47 ???

• Eitherthere is no leopard and then no result...

• Orthere is a leopard and then...

Non-empty result: 1(10.8)×(10.2)

= 0.84

• Thequery probabilityis: 0.1×0.84

(110)

Query evaluation done right

U

date teacher room 04 Silviu C47 0.8 04 Antoine C47 0.2

Repair room cause C47 leopard0.1

πroom(U×Repair) room

C47 ???

• Eitherthere is no leopard and then no result...

• Thequery probabilityis: 0.1×0.84

(111)

Query evaluation done right

U

date teacher room 04 Silviu C47 0.8 04 Antoine C47 0.2

Repair room cause C47 leopard0.1

πroom(U×Repair) room

C47

• Eitherthere is no leopard and then no result...

• Orthere is a leopard and then...

Non-empty result: 1(10.8)×(10.2) = 0.84

• Thequery probabilityis:

0.1×0.84

(112)

Query evaluation done right

U

date teacher room 04 Silviu C47 0.8 04 Antoine C47 0.2

Repair room cause C47 leopard0.1

πroom(U×Repair) room

C47 0.084

• Eitherthere is no leopard and then no result...

(113)

Expressiveness of TID

Can we representallprobabilistic instances with TID?

“The class is taught by Antoine or Silviu or no one butnot both” U1

teacher Silviu π(U1) = 0.8

U2

teacher Antoine π(U2) = 0.1

U3

teacher

π(U3) = 0.1

U teacher Antoine

0.1

Silviu

0.8

Wecannotforbid that both teach the class!

(114)

Expressiveness of TID

Can we representallprobabilistic instances with TID?

“The class is taught by Antoine or Silviu or no one butnot both”

U1

teacher Silviu π(U1) = 0.8

U2

teacher Antoine π(U2) = 0.1

U3

teacher

π(U3) = 0.1

U teacher Antoine

0.1

Silviu

0.8

Wecannotforbid that both teach the class!

(115)

Expressiveness of TID

Can we representallprobabilistic instances with TID?

“The class is taught by Antoine or Silviu or no one butnot both”

U1

teacher Silviu π(U1) = 0.8

U2

teacher Antoine π(U2) = 0.1

U3

teacher

π(U3) = 0.1

U teacher Antoine

0.1

Silviu

0.8

Wecannotforbid that both teach the class!

(116)

Expressiveness of TID

Can we representallprobabilistic instances with TID?

“The class is taught by Antoine or Silviu or no one butnot both”

U1

teacher Silviu π(U1) = 0.8

U2

teacher Antoine π(U2) = 0.1

U3

teacher

π(U3) = 0.1

U teacher Antoine

0.1

Silviu

0.8

Wecannotforbid that both teach the class!

(117)

Expressiveness of TID

Can we representallprobabilistic instances with TID?

“The class is taught by Antoine or Silviu or no one butnot both”

U1

teacher Silviu π(U1) = 0.8

U2

teacher Antoine π(U2) = 0.1

U3

teacher π(U3) = 0.1

U teacher Antoine

0.1

Silviu

0.8

Wecannotforbid that both teach the class!

(118)

Expressiveness of TID

Can we representallprobabilistic instances with TID?

“The class is taught by Antoine or Silviu or no one butnot both”

U1

teacher Silviu π(U1) = 0.8

U2

teacher Antoine π(U2) = 0.1

U3

teacher

π(U3) = 0.1

U teacher

0.1 0.8

Wecannotforbid that both teach the class!

(119)

Expressiveness of TID

Can we representallprobabilistic instances with TID?

“The class is taught by Antoine or Silviu or no one butnot both”

U1

teacher Silviu π(U1) = 0.8

U2

teacher Antoine π(U2) = 0.1

U3

teacher

π(U3) = 0.1

U teacher Antoine 0.1 Silviu

0.8

Wecannotforbid that both teach the class!

Références

Documents relatifs

Some results can be transferred between probabilistic relational databases and probabilistic XML [Amarilli and Senellart,

“The place and function of Venus in Ovid...”. “Computed backscattering function of Venus and

Antoine Amarilli 1 , Silviu Maniu 2 November 21st, 2017... Class 1 (Nov 21): Introduction and

Π teacher,resp (Class) teacher resp Antoine Fabian Silviu Fabian.. → Duplicates

• Catalog(sid, pid, cost), listing the prices charged for parts by suppliers3. Write the following queries in relational algebra and

• In SQL, values can be True, False, or Unknown (NULL).. • Essentially anything that involves NULL

This data allows the model to more accurately predict how terrain will respond to surface water (for example, how quickly water will be absorbed into the

graph analysis, the proposed algebra allows the construc- tion of queries involving subgoals such as: obtain a sub- graph based on given nodes properties and edge labels; cal-