This shows you the differences between two versions of the page.
Both sides previous revision Previous revision | Next revision Both sides next revision | ||
sql-derivative-sensitivity-analyser_advanced [2018/11/21 14:36] alisa |
sql-derivative-sensitivity-analyser_advanced [2018/11/26 10:09] alisa |
||
---|---|---|---|
Line 14: | Line 14: | ||
</code> | </code> | ||
- | TODO: continue and write about compound norms | + | Here we assume that the columns ''latitude'' and ''longitude'' are sensitive in the rows indexed by 0, 3, and 7. It is possible to define more sophisticated sensitive components. For this, the norm description is extended by a sequence of variable assignments, denoting how the norm is computed. Supported operations are scaling and l<sub>p</sub>-norms, which can be composed in an arbitrary way. |
+ | |||
+ | <code> | ||
+ | rows: i_1 i_2 ... i_n ; | ||
+ | cols: attr_1 attr_2 ... attr_n ; | ||
+ | |||
+ | var_1 = op_1 var_11 ... var_1m; | ||
+ | .... | ||
+ | var_n = op_n var_n1 ... var_nm; | ||
+ | return op var_n; | ||
+ | </code> | ||
+ | |||
+ | As an example, let us consider the following norm definition. | ||
+ | |||
+ | <code> | ||
+ | rows: 0 3 7 ; | ||
+ | cols: latitude longitude ; | ||
+ | |||
+ | u = lp 2.0 latitude longitude; | ||
+ | z = scaleNorm 0.2 u; | ||
+ | return linf z; | ||
+ | </code> | ||
+ | |||
+ | The line ''u = lp 2.0 latitude longitude;'' combines latitude and longitude to define Euclidean distance (i.e l<sub>2</sub>-norm). We may scale the distances, and 0.2 in the line ''z = scaleNorm 0.2 u''; means that we conceal changes in location up to 1/0.2 = 5 units. Finally, ''return linf z;'' shows how the distance between the tables is computed from the distances between their rows, and ''linf'' means that we take the maximum row distance (i.e l<sub>∞</sub>-norm), so DP conceals the change even if all sensitive rows change by a unit. | ||
=== Combined sensitivity === | === Combined sensitivity === | ||
TODO: explain shortly what combined sensitivity is and how to use it | TODO: explain shortly what combined sensitivity is and how to use it |