added binary denoising notebook

http://nbviewer.ipython.org/gist/Jiaolong/c971175818df85f2c181
I understand this is what we are doing in code. Conventionally, people
don't use a joint "node" feature vector phi_u or a joint "edge" feature
vector phi_p. Besides, if this is a dot product, may be better to use a
transpose.


On Mon, Aug 25, 2014 at 2:37 AM, Jiaolong <notifications@github.com> wrote:

> In doc/ipython-notebooks/structure/Binary_Denoising.ipynb:
>
> > +      "\n",
> > +      "Given a noise black/withe image $\\textbf{x}$ of size $m \\times n$, the task of denoising is to predicted the original binary image $\\textbf{y}$. We flatten the image into a long vector $\\textbf{y} = [y_0, \\dots, y_{m\\times n}]$, where $y_i \\in \\{0, 1\\}$ is the value for pixel $i$. In this work, we aim to learn a model from a bunch of noise input images and their ground truth binary images, i.e., supervised learning. One may think about learning a binary classifier for each pixel. It has several drawbacks. First, we may not care about classifying every single pixel completely correct, i.e., if we misclassify a single pixel, this is not as bad as misclassify a whole image. Second, we lose all context, e.g., pairwise pixels (one pixel and its neighbore). The structured predition here is to predict an entire binary image $\\textbf{y}$ or a grid graph of $m \\times n$. Here, the output space $\\mathcal{Y}$ is all possible binary images of size $m \\times n$. It
>  can be formulated as following:\n",
> > +      "\n",
> > +      "$$\n",
> > +      "\\hat{\\textbf{y}} = \\underset{\\textbf{y} \\in \\mathcal{Y}}{\\operatorname{argmax}} f(\\textbf{x},\\textbf{y}),    (1)\n",
> > +      "$$\n",
> > +      "\n",
> > +      "where $f(\\textbf{x},\\textbf{y})$ is the compitibility function, measures how well $\\textbf{y}$ fits $\\textbf{x}$. There are basically three challenges in doing structured learning and prediction:\n",
> > +      "- Choosing a parametric form of $f(\\textbf{x},\\textbf{y})$\n",
> > +      "- solving $\\underset{\\textbf{y} \\in \\mathcal{Y}}{\\operatorname{argmax}} f(\\textbf{x},\\textbf{y})$\n",
> > +      "- learning parameters for $f(\\textbf{x},\\textbf{y})$ to minimize a loss\n",
> > +      "\n",
> > +      "In this work, our parameters are pairwise and unary potentials and they can be written as:\n",
> > +      "\n",
> > +      "$$\n",
> > +      "f(\\textbf{x},\\textbf{y}) = \\sum_i \\theta_u \\phi_u(\\textbf{x},y_i) + \\theta_p\\phi_p(\\textbf{x}, y_i, y_j),    (2)\n",
>
> Since theta_p is independent to i, j, I think we can just put
> theta_p*phi_p(x, y_i, y_j). Here, phi_p(x, y_i, y_j) is in the form of
> joint feature.
>
> —
> Reply to this email directly or view it on GitHub
> <https://github.com/shogun-toolbox/shogun/pull/2467/files#r16648138>.
>



-- 
/**
* ============HuShell============
*/