450 likes | 539 Views
CS345. Compact Skeletons. Compact Skeletons. Assume tuples components are scattered over website We have a tagger that can tag all tuple components on website Assume no noise for now Reconstruct relation. Compact Skeletons. Relation. Skeleton. Data Graph. Website. Welcome to Big Corp!
E N D
CS345 Compact Skeletons
Compact Skeletons • Assume tuples components are scattered over website • We have a tagger that can tag all tuple components on website • Assume no noise for now • Reconstruct relation
Compact Skeletons Relation Skeleton Data Graph Website
Welcome to Big Corp! Join our team. The following jobs are open: Job #12345 Job #12346 Send resumes to: Jobs are available in these departments: R&D Corporate Job Title: Salary: Must know Java….. 1200 Jose Blvd, CA 94123 Programmer 100K Dept (D) Title (T) Salary (S) Address (A)
Welcome to Big Corp! Join our team. The following jobs are open: Job #12345 Job #12346 Send resumes to: Jobs are available in these departments: R&D Corporate Dept (D) Title (T) Salary (S) Address (A) Job Title: Salary: Must know Java….. 1200 Jose Blvd, CA 94123 Programmer 100K
Programmer 100K R & D Corporate 1200 Jose Blvd
Corporate 400 7th Ave CEO Admin Asst 60K Programmer 100K 150K CTO TSDA R & D 1200 Jose Blvd Programmer 100K R &D 1200 Jose Blvd CTO 150K R & D 1200 Jose Blvd Admin Asst 60K Corporate 400 7th Ave CEO (null) Corporate 400 7th Ave
R & D 1200 Jose Blvd Programmer 100K 150K CTO TSDA Corporate CEO Admin Asst 60K Programmer 100K R &D 1200 Jose Blvd CTO 150K R & D 1200 Jose Blvd Admin Asst 60K Corporate 1200 Jose Blvd CEO (null) Corporate 1200 Jose Blvd
Relation Skeleton Data Graph Website
Skeletons • Labeled trees • Transformation from data graphs to relations D D A A T S T S
150K CTO Overlays R & D D 1200 Jose Blvd A T S Programmer 100K
150K CTO T S D A Programmer 100K R &D 1200 Jose Blvd Overlays R & D D 1200 Jose Blvd A T S Programmer 100K
T S D A Programmer 100K R &D 1200 Jose Blvd Overlays R & D D 1200 Jose Blvd A T S 150K CTO Programmer 100K CTO 150K R &D 1200 Jose Blvd
Overlays R & D D A 1200 Jose Blvd T S Programmer 100K CTO 150K
T S D A Programmer 150K R &D 1200 Jose Blvd Overlays R & D D A 1200 Jose Blvd T S Programmer 100K CTO 150K
T S D A Programmer 150K R &D 1200 Jose Blvd Overlays R & D D A 1200 Jose Blvd T S Programmer 100K CTO 150K CTO 100K R & D 1200 Jose Blvd
Inconsistent Overlays R & D D A 1200 Jose Blvd T S Programmer 100K CTO 150K
Inconsistent Overlays R & D D A 1200 Jose Blvd T S Programmer 100K CTO 150K
Compact Skeletons • A skeleton is compact if all overlays are consistent • Perfect if each node and edge of data graph is covered by at least one overlay • Given a data graph G, does G have a Perfect Compact Skeleton (PCS)? • Not always • But if it exists it is unique
PCS Algorithm R & D 1200 Jose Blvd 150K Programmer 100K CTO
Work bottom-up: Compute node signatures Place nodes in equivalence classes based on signature Construct skeleton from equivalence classes PCS Algorithm D A S T T S
D A T S PCS Algorithm D A S T T S
Incomplete information Corporate D A 400 7th Ave CEO T S Admin Asst 60K
T S D A Admin Asst 60K Corporate 400 7th Ave Incomplete information Corporate D A 400 7th Ave CEO T S Admin Asst 60K
T S D A Admin Asst 60K Corporate 400 7th Ave CEO Corporate 400 7th Ave Incomplete information Corporate D A 400 7th Ave CEO T S Admin Asst 60K
Partial Compact Skeletons • For data graphs with incomplete information, we allow partial overlays • Results in nulls in relation • If we can use consistent partial overlays to cover every node and edge of the graph, we have a partially perfect compact skeleton (PPCS)
Tuple subsumption • Tuple tsubsumes tuple u if t and u agree on every component of u that is not null t u
Noisy Data Graphs • Real-life websites are noisy • False positives e.g., MS = degree, state or Microsoft? • Non-skeleton links e.g., featured products
Data graph for a retail website C Skeleton K1 I P A a4 c3 c2 c1 C: Category I: Item P: Price A: Availability i2 i4 i1 i3 p1 a1 p3 p4 a2 a3 For simplicity: assume all nodes have a label
Coverage of a skeleton C Skeleton K1 I P A c3 c2 c1 i2 i4 i1 a4 i3 p1 a1 p3 p4 a2 a3
Coverage of a skeleton C Skeleton K1 Coverage = 28 I P A c3 c2 c1 i2 i4 i1 a4 i3 p1 a1 p3 p4 a2 a3
Coverage of a skeleton C Skeleton K1 Coverage = 28 I P A c3 c2 c1 i2 i4 i1 a4 i3 C I Skeleton K2 Coverage = 12 P p1 a1 p3 p4 a2 a3 A
Skeletons for Noisy Data Graphs • Problem: • Find skeleton K with optimal coverage, called the best-fit skeleton (BFS) • NP-complete
Greedy Heuristic for BFS r c3 c2 c1 i2 i4 i1 a4 i3 p1 a1 p3 p4 a2 a3
Greedy Heuristic for BFS R C I P A R C C C I I I A I P A P P A A
R B A C D Greedy skeleton R B A C C C D D D D
R B A C C C D D D D R B A C D Greedy skeleton Coverage = 9
R B A C D Greedy skeleton Coverage = 9 R B A C C C D D D D R B A C D Optimal skeleton Coverage = 15
Weighted Greedy Heuristic • Simple Greedy heuristic uses parent counts • “Memory-less” • Weighted Greedy heuristic takes into account past selections to improve simple greedy selection • Computes “benefit” of each decision at every stage
R Weighted Greedy B A C C C D D D D R B A C C D D Greedy skeleton Coverage = 9
benefit ( A C ) = 4 R Weighted Greedy B A C C C D D D D R B A C C D D Greedy skeleton Coverage = 9
benefit ( A C ) = 4 benefit (B C ) = 10 R Weighted Greedy B A C C C D D D D R B A C C D D Greedy skeleton Coverage = 9
R A R Weighted Greedy B A C C C D D D D R B B A C C D D Greedy skeleton Coverage = 9
R B A C D Greedy skeleton Coverage = 9 R B A C C C D D D D R B A C D Weighted greedy skeleton Coverage = 15
Summary Relation Compact Skeleton Data Graph Website