<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Cassio Pennachin &#187; Research</title>
	<atom:link href="http://www.pennachin.com/category/research/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.pennachin.com</link>
	<description>Exploring and mining data for fun, a degree, and profit</description>
	<lastBuildDate>Fri, 24 Mar 2017 14:10:26 +0000</lastBuildDate>
	<language>en-US</language>
		<sy:updatePeriod>hourly</sy:updatePeriod>
		<sy:updateFrequency>1</sy:updateFrequency>
	<generator>https://wordpress.org/?v=3.9.40</generator>
	<item>
		<title>Affine Arithmetic</title>
		<link>http://www.pennachin.com/2011/10/affine-arithmetic/</link>
		<comments>http://www.pennachin.com/2011/10/affine-arithmetic/#comments</comments>
		<pubDate>Mon, 03 Oct 2011 22:32:45 +0000</pubDate>
		<dc:creator><![CDATA[Cassio]]></dc:creator>
				<category><![CDATA[Research]]></category>

		<guid isPermaLink="false">http://www.pennachin.com/?p=69</guid>
		<description><![CDATA[In my previous post, I talked about interval arithmetic, a simple and popular formalism for handling interval data. We saw how interval arithmetic&#8217;s simplicity has a downside, namely the error explosion that happens as a consequence of ignoring dependencies between variables. Affine arithmetic was proposed as an alternative, and it explicitly accounts for dependencies between [&#8230;]]]></description>
				<content:encoded><![CDATA[<p>In my previous post, I talked about <a title="Interval Arithmetic" href="http://www.pennachin.com/2011/09/interval-arithmetic/">interval arithmetic</a>, a simple and popular formalism for handling interval data. We saw how interval arithmetic&#8217;s simplicity has a downside, namely the error explosion that happens as a consequence of ignoring dependencies between variables.</p>
<p>Affine arithmetic was proposed as an alternative, and it explicitly accounts for dependencies between variables, because it represents intervals as <em>affine forms.</em> Here&#8217;s the generic form for an interval <img src='http://s0.wp.com/latex.php?latex=%5Chat%7Bx%7D&#038;bg=ffffff&#038;fg=000000&#038;s=0' alt='\hat{x}' title='\hat{x}' class='latex' />, corresponding to some quantity x:</p>
<p style="text-align: center;"><img src='http://s0.wp.com/latex.php?latex=%5Chat%7Bx%7D+%3D+x_0+%2B+x_1+%5Cepsilon_1+%2B+%5Cldots+%2B+x_n%5Cepsilon_n&#038;bg=ffffff&#038;fg=000000&#038;s=0' alt='\hat{x} = x_0 + x_1 \epsilon_1 + \ldots + x_n\epsilon_n' title='\hat{x} = x_0 + x_1 \epsilon_1 + \ldots + x_n\epsilon_n' class='latex' /></p>
<p>As we see, the affine form is a linear combination. The first term, <img src='http://s0.wp.com/latex.php?latex=x_0&#038;bg=ffffff&#038;fg=000000&#038;s=0' alt='x_0' title='x_0' class='latex' />, is the central coefficient. The remaining terms are of the form <img src='http://s0.wp.com/latex.php?latex=x_i+%5Cepsilon_i&#038;bg=ffffff&#038;fg=000000&#038;s=0' alt='x_i \epsilon_i' title='x_i \epsilon_i' class='latex' />. Each such term represents one source of noise, or uncertainty, that we know about x. In those terms, the <img src='http://s0.wp.com/latex.php?latex=x_i&#038;bg=ffffff&#038;fg=000000&#038;s=0' alt='x_i' title='x_i' class='latex' /> are real coefficients, and the $\epsilon_i$ are called <em>noise symbols</em>, and can be either 1 or -1. This means the range of an affine form is <img src='http://s0.wp.com/latex.php?latex=%5Csum_%7Bi%3D0%7D%5E%7Bn%7D+x_i&#038;bg=ffffff&#038;fg=000000&#038;s=0' alt='\sum_{i=0}^{n} x_i' title='\sum_{i=0}^{n} x_i' class='latex' />.</p>
<p>In the simplest case, then, one could represent a interval <img src='http://s0.wp.com/latex.php?latex=%5Cbar%7Bx%7D+%3D+%5B1%2C+2%5D&#038;bg=ffffff&#038;fg=000000&#038;s=0' alt='\bar{x} = [1, 2]' title='\bar{x} = [1, 2]' class='latex' /> as an affine form with a single noise symbol: <img src='http://s0.wp.com/latex.php?latex=%5Chat%7Bx%7D+%3D+1.5+%2B+0.5+%5Cepsilon_1&#038;bg=ffffff&#038;fg=000000&#038;s=0' alt='\hat{x} = 1.5 + 0.5 \epsilon_1' title='\hat{x} = 1.5 + 0.5 \epsilon_1' class='latex' />.  In fact, this is how one converts between affine forms and intervals.</p>
<p>Things become more interesting, however, when we note that all the noise symbols can be shared by multiple affine forms. In other words, a symbol such as, say, <img src='http://s0.wp.com/latex.php?latex=%5Cepsilon_4&#038;bg=ffffff&#038;fg=000000&#038;s=0' alt='\epsilon_4' title='\epsilon_4' class='latex' /> is <em>the same <img src='http://s0.wp.com/latex.php?latex=%5Cmathit%7B%5Cepsilon_4%7D&#038;bg=ffffff&#038;fg=000000&#038;s=0' alt='\mathit{\epsilon_4}' title='\mathit{\epsilon_4}' class='latex' /></em> in all affine forms that contain it, and has the same value when they are evaluated. All those forms have some source of uncertainty in common, and the shared noise symbol is the way affine arithmetic represents that relation. Those forms are no longer independent, and their dependencies are explicitly handled through the sharing of noise symbols.</p>
<p>For an example of how this is useful, consider two affine forms, <img src='http://s0.wp.com/latex.php?latex=%5Chat%7Bx%7D+%3D+10+%2B+3%5Cepsilon_1+-+4%5Cepsilon_3&#038;bg=ffffff&#038;fg=000000&#038;s=0' alt='\hat{x} = 10 + 3\epsilon_1 - 4\epsilon_3' title='\hat{x} = 10 + 3\epsilon_1 - 4\epsilon_3' class='latex' /> and  <img src='http://s0.wp.com/latex.php?latex=%5Chat%7By%7D+%3D+8+%2B+%5Cepsilon_2+%2B+2%5Cepsilon_3&#038;bg=ffffff&#038;fg=000000&#038;s=0' alt='\hat{y} = 8 + \epsilon_2 + 2\epsilon_3' title='\hat{y} = 8 + \epsilon_2 + 2\epsilon_3' class='latex' />. Using the formula for ranges above, we know that the value of x is in the interval [13, 27], and the range of y is the interval [2, 14]. So if we were to plot the point (x, y) on a plane, it could be anywhere in the rectangle delimited by the above values (light gray in the picture below). But we know that x and y have two sources of uncertainty each, and that some of their uncertainty is explained by the same source (corresponding to <img src='http://s0.wp.com/latex.php?latex=%5Cepsilon_3&#038;bg=ffffff&#038;fg=000000&#038;s=0' alt='\epsilon_3' title='\epsilon_3' class='latex' />). The shared noise symbol allows us to estimate their joint range, or the area in which the point (x, y) can lie, more precisely, as the darker polygon in the figure below.</p>
<p><a href="http://www.pennachin.com/wp-content/uploads/2011/10/AffineForm.png"><img class="size-full wp-image-109 aligncenter" title="Joint Affine Form range" src="http://www.pennachin.com/wp-content/uploads/2011/10/AffineForm.png" alt="Joint Affine Form Range" width="601" height="414" /></a></p>
<p>Affine arithmetic provides operations on affine forms as well. These can be of two kinds: affine operations, which are linear combinations of its inputs, and non-affine operations. The first kind includes addition, subtraction, negation, multiplication by scalars and combinations of those. The generic formula for linear combinations of two affine forms is:</p>
<p style="text-align: center;"><img src='http://s0.wp.com/latex.php?latex=z+%3D+%5Calpha+x+%2B+%5Cbeta+y+%2B+%5Cgamma&#038;bg=ffffff&#038;fg=000000&#038;s=0' alt='z = \alpha x + \beta y + \gamma' title='z = \alpha x + \beta y + \gamma' class='latex' /></p>
<p style="text-align: center;"><img src='http://s0.wp.com/latex.php?latex=%5Chat%7Bz%7D+%3D+%28%5Calpha+x_0+%2B+%5Cbeta+y_0+%2B+%5Cgamma%29+%2B+%5Csum_%7Bi%3D1%7D+%28%5Calpha+x_i+%2B+%5Cbeta+y_i%29&#038;bg=ffffff&#038;fg=000000&#038;s=0' alt='\hat{z} = (\alpha x_0 + \beta y_0 + \gamma) + \sum_{i=1} (\alpha x_i + \beta y_i)' title='\hat{z} = (\alpha x_0 + \beta y_0 + \gamma) + \sum_{i=1} (\alpha x_i + \beta y_i)' class='latex' /></p>
<p>where <img src='http://s0.wp.com/latex.php?latex=%5Calpha%2C+%5Cbeta%2C+%5Cgamma&#038;bg=ffffff&#038;fg=000000&#038;s=0' alt='\alpha, \beta, \gamma' title='\alpha, \beta, \gamma' class='latex' /> are real numbers. Obviously, setting appropriate values for one or more of those gives us the elementary operations of addition (<img src='http://s0.wp.com/latex.php?latex=%5Calpha%3D1%2C+%5Cbeta%3D1%2C+%5Cgamma+%3D+0&#038;bg=ffffff&#038;fg=000000&#038;s=0' alt='\alpha=1, \beta=1, \gamma = 0' title='\alpha=1, \beta=1, \gamma = 0' class='latex' />), subtraction (<img src='http://s0.wp.com/latex.php?latex=%5Calpha+%3D+1%2C+%5Cbeta+%3D+-1%2C+%5Cgamma+%3D+0&#038;bg=ffffff&#038;fg=000000&#038;s=0' alt='\alpha = 1, \beta = -1, \gamma = 0' title='\alpha = 1, \beta = -1, \gamma = 0' class='latex' />) and so forth.</p>
<p>All affine operations are computed by specializations of the above formula, so they introduce no error during their computation. Also, elementary arithmetic axioms are respected, so the results look natural. For instance, it&#8217;s easy to see how x-x will be zero. Affine operations are also commutative, transitive, etc.</p>
<p>Unfortunately, not all useful operations are affine ones. Non-affine operations such as multiplication, division, logarithms and others are less straightforward, and will be presented in the next article in this series.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.pennachin.com/2011/10/affine-arithmetic/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Interval Arithmetic</title>
		<link>http://www.pennachin.com/2011/09/interval-arithmetic/</link>
		<comments>http://www.pennachin.com/2011/09/interval-arithmetic/#comments</comments>
		<pubDate>Mon, 19 Sep 2011 22:24:33 +0000</pubDate>
		<dc:creator><![CDATA[Cassio]]></dc:creator>
				<category><![CDATA[Research]]></category>

		<guid isPermaLink="false">http://www.pennachin.com/?p=51</guid>
		<description><![CDATA[Continuing the series on interval methods, this post will give us more details about interval arithmetic, the most popular interval formalism. In interval arithmetic each quantity (think of it as a scalar variable, or a floating point number in your favorite programming language x is represented as an interval , where . Most operations in [&#8230;]]]></description>
				<content:encoded><![CDATA[<p>Continuing the series on interval methods, this post will give us more details about interval arithmetic, the most popular interval formalism. In interval arithmetic each quantity (think of it as a scalar variable, or a floating point number in your favorite programming language x is represented as an interval <img src='http://s0.wp.com/latex.php?latex=%5Cbar%7Bx%7D+%3D+%5Bx_L%2C+x_U%5D&#038;bg=ffffff&#038;fg=000000&#038;s=0' alt='\bar{x} = [x_L, x_U]' title='\bar{x} = [x_L, x_U]' class='latex' />, where <img src='http://s0.wp.com/latex.php?latex=x_L+%5Cleq+x_U%2C+x+%5Cin+%5CRe&#038;bg=ffffff&#038;fg=000000&#038;s=0' alt='x_L \leq x_U, x \in \Re' title='x_L \leq x_U, x \in \Re' class='latex' />.</p>
<p>Most operations in interval arithmetic are simple and intuitive. Some examples are:</p>
<ul>
<li><img src='http://s0.wp.com/latex.php?latex=%5Cbar%7Bx%7D+%2B+%5Cbar%7By%7D+%3D+%5Bx_L+%2B+y_L%2C+x_U+%2B+y_U%5D&#038;bg=ffffff&#038;fg=000000&#038;s=0' alt='\bar{x} + \bar{y} = [x_L + y_L, x_U + y_U]' title='\bar{x} + \bar{y} = [x_L + y_L, x_U + y_U]' class='latex' />;</li>
<li><img src='http://s0.wp.com/latex.php?latex=%5Cbar%7Bx%7D+-+%5Cbar%7By%7D+%3D+%5Bx_L+-+y_U%2C+x_U+%2B+y_L%5D&#038;bg=ffffff&#038;fg=000000&#038;s=0' alt='\bar{x} - \bar{y} = [x_L - y_U, x_U + y_L]' title='\bar{x} - \bar{y} = [x_L - y_U, x_U + y_L]' class='latex' />;</li>
<li><img src='http://s0.wp.com/latex.php?latex=%5Cbar%7Bx%7D+%5Ctimes+%5Cbar%7By%7D+%3D+%5Bmin%28x_L+y_L%2Cx_L+y_U%2Cx_U+y_L%2Cx_U+y_U%29%2C+max%28x_L+y_L%2Cx_L+y_U%2Cx_U+y_L%2Cx_U+y_U%29%5D&#038;bg=ffffff&#038;fg=000000&#038;s=0' alt='\bar{x} \times \bar{y} = [min(x_L y_L,x_L y_U,x_U y_L,x_U y_U), max(x_L y_L,x_L y_U,x_U y_L,x_U y_U)]' title='\bar{x} \times \bar{y} = [min(x_L y_L,x_L y_U,x_U y_L,x_U y_U), max(x_L y_L,x_L y_U,x_U y_L,x_U y_U)]' class='latex' />;</li>
<li><img src='http://s0.wp.com/latex.php?latex=1+%2F+%5Cbar%7Bx%7D+%3D+%5Bmin%281%2Fx_L%2C1%2Fx_U%29%2C+max%281%2Fx_L%2C1%2Fx_U%29%5D%2C%5C%3B+%5Cmbox%7Bif%7D%5C%3B0+%5Cnotin+%5Cbar%7Bx%7D&#038;bg=ffffff&#038;fg=000000&#038;s=0' alt='1 / \bar{x} = [min(1/x_L,1/x_U), max(1/x_L,1/x_U)],\; \mbox{if}\;0 \notin \bar{x}' title='1 / \bar{x} = [min(1/x_L,1/x_U), max(1/x_L,1/x_U)],\; \mbox{if}\;0 \notin \bar{x}' class='latex' />;</li>
<li><img src='http://s0.wp.com/latex.php?latex=%5Cbar%7Bx%7D+%2F+%5Cbar%7By%7D+%3D+%5Cbar%7Bx%7D+%5Ctimes+1%2F%5Cbar%7By%7D&#038;bg=ffffff&#038;fg=000000&#038;s=0' alt='\bar{x} / \bar{y} = \bar{x} \times 1/\bar{y}' title='\bar{x} / \bar{y} = \bar{x} \times 1/\bar{y}' class='latex' />;</li>
<li><img src='http://s0.wp.com/latex.php?latex=e%5E%7B%5Cbar%7Bx%7D%7D+%3D+%5Be%5E%7Bx_L%7D%2C+e%5E%7Bx_U%7D%5D&#038;bg=ffffff&#038;fg=000000&#038;s=0' alt='e^{\bar{x}} = [e^{x_L}, e^{x_U}]' title='e^{\bar{x}} = [e^{x_L}, e^{x_U}]' class='latex' />.</li>
</ul>
<p>Intervals don&#8217;t have to be finite. There&#8217;s an empty interval, represented by <img src='http://s0.wp.com/latex.php?latex=%5B%5D&#038;bg=ffffff&#038;fg=000000&#038;s=0' alt='[]' title='[]' class='latex' />, and an one or both interval limites can be infinite: <img src='http://s0.wp.com/latex.php?latex=%5B-%5Cinfty%2C+%5Cinfty%5D&#038;bg=ffffff&#038;fg=000000&#038;s=0' alt='[-\infty, \infty]' title='[-\infty, \infty]' class='latex' />. Interval arithmetic implementations typically handle invalid domain inputs (such as being asked to compute the square root of <img src='http://s0.wp.com/latex.php?latex=%5B-2%2C+2%5D&#038;bg=ffffff&#038;fg=000000&#038;s=0' alt='[-2, 2]' title='[-2, 2]' class='latex' />) by operating only on the valid range (this is a design choice, and perhaps it would be preferred to &#8220;fail early&#8221; with an error).</p>
<p>There are numerous open source implementations of interval arithmetic in various languages, including <a href="http://www.boost.org/doc/libs/1_47_0/libs/numeric/interval/doc/interval.htm">C++</a> (part of Boost), <a href="http://www.ti3.tu-harburg.de/rump/intlab/">MATLAB</a>, <a href="http://code.google.com/p/mpmath/">Python</a>, and others. There is also an <a href="http://interval.sourceforge.net/interval/scheme/giaeval/iaevaldemo.html">online interval calculator</a> you can play with.</p>
<p>Let&#8217;s work through a simple expression using intervals and the above operations. Say <img src='http://s0.wp.com/latex.php?latex=%5Cbar%7Bx%7D+%3D+%5B2%2C+4%5D&#038;bg=ffffff&#038;fg=000000&#038;s=0' alt='\bar{x} = [2, 4]' title='\bar{x} = [2, 4]' class='latex' /> and <img src='http://s0.wp.com/latex.php?latex=%5Cbar%7By%7D+%3D+%5B1%2C+2%5D&#038;bg=ffffff&#038;fg=000000&#038;s=0' alt='\bar{y} = [1, 2]' title='\bar{y} = [1, 2]' class='latex' />. Let&#8217;s compute <img src='http://s0.wp.com/latex.php?latex=e%5E%7B%5Cbar%7By%7D%7D+%5Ctimes+%5Cfrac%7B%5Cbar%7Bx%7D+-%5Cbar%7By%7D%7D%7B%5Cbar%7Bx%7D+%2B+%5Cbar%7By%7D%7D+&#038;bg=ffffff&#038;fg=000000&#038;s=0' alt='e^{\bar{y}} \times \frac{\bar{x} -\bar{y}}{\bar{x} + \bar{y}} ' title='e^{\bar{y}} \times \frac{\bar{x} -\bar{y}}{\bar{x} + \bar{y}} ' class='latex' />, in steps:</p>
<ol>
<li><img src='http://s0.wp.com/latex.php?latex=e1+%3D+e%5E%7B%5Cbar%7Bx%7D%7D+%3D+%5Be%5E1%2C+e%5E2%5D+%5Csimeq+%5B2.718%2C+7.389%5D&#038;bg=ffffff&#038;fg=000000&#038;s=0' alt='e1 = e^{\bar{x}} = [e^1, e^2] \simeq [2.718, 7.389]' title='e1 = e^{\bar{x}} = [e^1, e^2] \simeq [2.718, 7.389]' class='latex' /></li>
<li><img src='http://s0.wp.com/latex.php?latex=e2+%3D+%5Cbar%7Bx%7D+-%5Cbar%7By%7D+%3D+%5B2-2%2C+4-1%5D+%3D+%5B0%2C+3%5D&#038;bg=ffffff&#038;fg=000000&#038;s=0' alt='e2 = \bar{x} -\bar{y} = [2-2, 4-1] = [0, 3]' title='e2 = \bar{x} -\bar{y} = [2-2, 4-1] = [0, 3]' class='latex' />;</li>
<li><img src='http://s0.wp.com/latex.php?latex=e3+%3D+%5Cbar%7Bx%7D+%2B+%5Cbar%7By%7D+%3D+%5B2%2B1%2C4%2B2%5D+%3D+%5B3%2C+6%5D&#038;bg=ffffff&#038;fg=000000&#038;s=0' alt='e3 = \bar{x} + \bar{y} = [2+1,4+2] = [3, 6]' title='e3 = \bar{x} + \bar{y} = [2+1,4+2] = [3, 6]' class='latex' />;</li>
<li><img src='http://s0.wp.com/latex.php?latex=e4+%3D+1%2Fe3+%3D+%5Bmin%281%2F3%2C1%2F6%29%2Cmax%281%2F3%2C1%2F6%29%5D+%3D+%5B1%2F6%2C1%2F3%5D&#038;bg=ffffff&#038;fg=000000&#038;s=0' alt='e4 = 1/e3 = [min(1/3,1/6),max(1/3,1/6)] = [1/6,1/3]' title='e4 = 1/e3 = [min(1/3,1/6),max(1/3,1/6)] = [1/6,1/3]' class='latex' />;</li>
<li><img src='http://s0.wp.com/latex.php?latex=e5+%3D+e2%2Fe3+%3D+e2+%5Ctimes+e4+%3D+%5Bmin%280%2C+0%2C+1%2F2%2C+1%29%2C+max%280%2C+0%2C+1%2F2%2C+1%29%5D+%3D+%5B0%2C1%5D&#038;bg=ffffff&#038;fg=000000&#038;s=0' alt='e5 = e2/e3 = e2 \times e4 = [min(0, 0, 1/2, 1), max(0, 0, 1/2, 1)] = [0,1]' title='e5 = e2/e3 = e2 \times e4 = [min(0, 0, 1/2, 1), max(0, 0, 1/2, 1)] = [0,1]' class='latex' />;</li>
<li><img src='http://s0.wp.com/latex.php?latex=e6+%3D+e1+%5Ctimes+e5+%3D+%5Bmin%280%2C+2.718%2C+0%2C+7.389%29%2C+max%280%2C+2.718%2C+0%2C+7.389%29%5D+%3D+%5B0%2C+7.389%5D&#038;bg=ffffff&#038;fg=000000&#038;s=0' alt='e6 = e1 \times e5 = [min(0, 2.718, 0, 7.389), max(0, 2.718, 0, 7.389)] = [0, 7.389]' title='e6 = e1 \times e5 = [min(0, 2.718, 0, 7.389), max(0, 2.718, 0, 7.389)] = [0, 7.389]' class='latex' />.</li>
</ol>
<p>While interval arithmetic operations are simple (and therefore fast implementations can be written) and mostly intuitive, they suffer from some issues. First, if an interval appears multiple times in the same computation, IA doesn&#8217;t know it represents the same quantity. This leads to some results that, from a real arithmetic perspective, are non-sensical. For instance, consider <img src='http://s0.wp.com/latex.php?latex=%5Cbar%7Bx%7D&#038;bg=ffffff&#038;fg=000000&#038;s=0' alt='\bar{x}' title='\bar{x}' class='latex' /> above. <img src='http://s0.wp.com/latex.php?latex=%5Cbar%7Bx%7D+-+%5Cbar%7Bx%7D+%3D+%5B-2%2C+2%5D&#038;bg=ffffff&#038;fg=000000&#038;s=0' alt='\bar{x} - \bar{x} = [-2, 2]' title='\bar{x} - \bar{x} = [-2, 2]' class='latex' />, while clearly the correct answer is 0.</p>
<p>This leads to an error explosion problem when the same quantity is repeatedly used in a chain of operations such as evaluating and polynomial. The end result is likely to bee too conservative (i.e., too wide) to be practical. For instance, still considering <img src='http://s0.wp.com/latex.php?latex=%5Cbar%7Bx%7D&#038;bg=ffffff&#038;fg=000000&#038;s=0' alt='\bar{x}' title='\bar{x}' class='latex' /> above, the simple expression <img src='http://s0.wp.com/latex.php?latex=%5Cbar%7Bx%7D+%5Ctimes+%286+-+%5Cbar%7Bx%7D%29&#038;bg=ffffff&#038;fg=000000&#038;s=0' alt='\bar{x} \times (6 - \bar{x})' title='\bar{x} \times (6 - \bar{x})' class='latex' /> leads to <img src='http://s0.wp.com/latex.php?latex=%5B4%2C+16%5D&#038;bg=ffffff&#038;fg=000000&#038;s=0' alt='[4, 16]' title='[4, 16]' class='latex' />, which is 12 times wider than the real result, <img src='http://s0.wp.com/latex.php?latex=%5B8%2C+9%5D&#038;bg=ffffff&#038;fg=000000&#038;s=0' alt='[8, 9]' title='[8, 9]' class='latex' /> (just iterate through a few values for x and you&#8217;ll get there).</p>
<p>Several extensions and improvements to interval arithmetic have been proposed to handle these issues. The one I use in my PhD work is affine arithmetic, and I&#8217;ll talk about it next in this series.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.pennachin.com/2011/09/interval-arithmetic/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Interval Methods and Robust Optimization</title>
		<link>http://www.pennachin.com/2011/08/interval-methods/</link>
		<comments>http://www.pennachin.com/2011/08/interval-methods/#comments</comments>
		<pubDate>Sun, 28 Aug 2011 04:09:23 +0000</pubDate>
		<dc:creator><![CDATA[Cassio]]></dc:creator>
				<category><![CDATA[Research]]></category>

		<guid isPermaLink="false">http://www.pennachin.com/?p=1</guid>
		<description><![CDATA[Interval methods define representations and operations for computing with intervals. When using intervals, exact quantities are replaced by a range of possibilities, which lets us account for various kinds of errors. These methods are often called interval analysis or interval arithmetic. The latter, however, refers to a specific popular formalism. While computing with ranges and [&#8230;]]]></description>
				<content:encoded><![CDATA[<p>Interval methods define representations and operations for computing with intervals. When using intervals, exact quantities are replaced by a range of possibilities, which lets us account for various kinds of errors. These methods are often called interval analysis or interval arithmetic. The latter, however, refers to a specific popular formalism.</p>
<p>While computing with ranges and uncertainties has been done for a long time, most people consider Moore&#8217;s <a href="http://www.amazon.com/gp/product/0134768531/ref=as_li_tf_tl?ie=UTF8&amp;tag=casspennperss-20&amp;linkCode=as2&amp;camp=217145&amp;creative=399373&amp;creativeASIN=0134768531">Interval Analysis</a> book from the 1960&#8242;s to be the seminal work in the field. That&#8217;s one of those books everyone cites but very few people read, as numerous modern introductions exist. Wikipedia has a good <a href="http://en.wikipedia.org/wiki/Interval_arithmetic">starting point</a>, as usual.</p>
<p>The original motivation for the introduction of interval arithmetic was to handle rounding errors introducing during numerical computations, as well as measurement errors in the inputs. Regarding the former, it&#8217;s interesting to note that Moore&#8217;s work predates the IEEE 754 standard for floating point arithmetic by a couple of decades.</p>
<p>It turns out that interval arithmetic is useful for many applications besides error handling. It is useful in computer graphics, robotics, and many other areas. One particular application is relevant to my work: robust optimization.</p>
<p>In order to understand robust optimization, let&#8217;s take a look at the grossly simplistic function plotted below. Assume we need to find the value of x that maximizes f(x). What&#8217;s that value?</p>
<p><a href="http://www.pennachin.com/wp-content/uploads/2011/08/chart1.png"><img class="alignnone size-full wp-image-43" title="Contrived objective function" src="http://www.pennachin.com/wp-content/uploads/2011/08/chart1.png" alt="A contrived objective function" width="823" height="625" /></a></p>
<p>It seems pretty obvious, right? In practice, the optimal value depends on how precisely you can measure x. In many real-world scenarios, x is estimated by a noisy process, and that introduces a degree of error. Let&#8217;s say that our measurement error is in the [-2, 2] interval, that is, a reading of 50 for x actually means that x could be anywhere from 48 to 52. That would mean there is no single best value for f(x), rather we have a range of values (a interval).</p>
<p>Now, if we want to find the best <strong>guaranteed</strong> range for f(x), we&#8217;re in the field of robust optimization. While there are many ways to define robust optimization, this is a simple and useful one: find the best worst case scenario, or the range of f(x) values with the highest min value (or lowest max value in minimization problems, hence the term min-max optimization). With this definition we see that our desired optimal value changes:</p>
<p><a href="http://www.pennachin.com/wp-content/uploads/2011/08/chart2.png"><img class="alignnone size-full wp-image-44" title="Contrived objective function with intervals" src="http://www.pennachin.com/wp-content/uploads/2011/08/chart2.png" alt="Contrived objective function with intervals" width="823" height="625" /></a></p>
<p>The rectangles in the above chart are made of intervals. In the horizontal axis we have the range of values for x, while the vertical axis corresponds to the resulting range of values for f(x). Using interval arithmetic one can estimate guaranteed bounds for the vertical interval, giving us a worst case scenario value, which is what we&#8217;d want to maximize in robust optimization. In this case we&#8217;d much rather have x around 85 than x around 20.</p>
<p>There are multiple ways to incorporate intervals into optimization algorithms, the most common and natural one being using it as a filter for a branch and bound method.</p>
<p>In the next post, we&#8217;ll look into interval arithmetic in more detail, including some of its shortcomings.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.pennachin.com/2011/08/interval-methods/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
