From 9b9ca0ef3256a5367fad407fcf1b289e1af54327 Mon Sep 17 00:00:00 2001 From: Aaron Huber Date: Thu, 5 Sep 2019 11:49:27 -0400 Subject: [PATCH] Most recent version --- combining.tex | 11 +++++++++-- macros.tex | 2 +- 2 files changed, 10 insertions(+), 3 deletions(-) diff --git a/combining.tex b/combining.tex index abf9aa5..d987acc 100644 --- a/combining.tex +++ b/combining.tex @@ -76,6 +76,11 @@ Note that with an odd number of sketches being multiplied, such as 3, we get the &\qquad + \gVP{3}{\wVec}\sum_{\substack{\wOne'\in \pw \st \\ \hashP{\wOne} = \hashP{\wVec}\\ \wOne \neq \wVec}} \gVP{1}{\wOne}\gVP{2}{\wOne}. \end{align*} +The even case can be reduced to the odd case by including the one's vector as an operand in the product, whose sketch is simply $\gIJ = \sum_{\wVec \in \pw}\polP{\wVec}$. The expectation then works out to +\begin{align*} +&\sum_{\wVec \in \pw}\gVP{1}{\wVec}\gVP{2}{\wVec} + \gVP{1}{\wVec}\sum_{\substack{\wTwo \in \pw \st \\ \wTwo \neq \wVec}}\gVP{2}{\wTwo} + \\ +&\qquad\gVP{2}{\wVec}\sum_{\substack{\wOne \in \pw \st\\\wOne \neq \wVec}}\gVP{1}{\wOne} + \sum_{\substack{\wOne \in \pw \st\\\wOne \neq \wVec}}\gVP{1}{\wOne}\gVP{2}{\wOne}. +\end{align*} For $\est{3}$, multiplying an even number of sketches yields \begin{align*} &\expect{\sum_{j \in \sketchCols}\sCom{1}{j} \cdot \sCom{2}{j}}\\ @@ -97,7 +102,7 @@ Following the reversal of the pattern of $\est{2}$, an odd number of sketches wo = & 0. \end{align*} -The case for an odd number of sketches can be reduced to the even case by including the one's vector as an operand in the product, whose sketch is simply $\gIJ = \sum_{\wVec \in \pw}\polP{\wVec}$. The expectation, albeit, does not yield the ground truth, +The case for an odd number of sketches can likewise be reduced to the even case as in $\est{2}$. The expectation, albeit, does not yield the ground truth, \begin{align*} &\expect{\sum_{j \in \sketchCols}\sCom{1}{j}\sCom{2}{j}\sCom{3}{j}\gIJ}\\ &= \sum_{j \in \sketchCols}\sum_{\substack{\wOne \in \pw \st\\ @@ -124,6 +129,7 @@ One potential work around would be to store additional sketches with independent \hashP{\wTwo} = \hashP{\wVec}}}\gVP{2}{\wTwo}\gVP{3}{\wTwo}\polI{2}{\wTwo}^2\right)\big]\\ &= \sum_{\wVec \in \pw}\gVP{1}{\wVec}\sum_{\wTwo \in \pw}\gVP{2}{\wTwo}\gVP{3}{\wTwo} \end{align*} +\startOld{Old Content} For the case of multiplication, when assumming independent variables, it is a known result that \[ \varParam{X \cdot Y} = \expect{X^2}\expect{Y^2} - (\expect{X})^2 (\expect{Y})^2. @@ -165,4 +171,5 @@ It then follows that the variance corresponding to the muliplication of two base The subscript notation for $\genV$ is used to denote sketch identity. Substituting upper bounds obtained for the L1 norm squared from \eqref{eq:norm1-sq-cauchy} results in \[ \norm{\genV_1}_2^2\cdot\norm{\genV_2}_2^2 - \left(|\pw|\right)\norm{\genV_1}_2^2 \cdot \left(|\pw|\right)\norm{\genV_2}_2^2. -\] \ No newline at end of file +\] +\finOld \ No newline at end of file diff --git a/macros.tex b/macros.tex index 3b7beac..c0616fe 100644 --- a/macros.tex +++ b/macros.tex @@ -141,7 +141,7 @@ \newcommand{\AH}[1]{\todo[inline, backgroundcolor=blue]{\textbf{Aaron says:$\,$} #1}} \newcommand{\SR}[1]{\todo[inline, backgroundcolor=white]{\textbf{Note to self:$\,$} #1}} \newcommand{\AR}[1]{\todo[inline, color=green]{\textbf{Atri says:$\,$} #1}} -\newcommand{\startOld}[1]{\textcolor{purple}{\newline-------------------------\newline\textbf{Old Content:\newline-------------------------\newline} #1}} +\newcommand{\startOld}[1]{\textcolor{purple}{\newline-------------------------\newline\textbf{Old Content:\newline-------------------------\newline} #1}\newline} \newcommand{\finOld}{\newline\textcolor{purple}{------------------------------\newline\textbf{END} Old Content\newline ------------------------------\newline}} %\newcommand{\comment}[1]{}