Debian Codegraph @

docs/manual/OT_learning_2_9__Output_distributions.html

raw symbols SCIP
1 <html><head><meta name="robots" content="index,follow"><meta http-equiv="Content-Type" content="text/html; charset=utf-8">
2 <title>OT learning 2.9. Output distributions</title>
3 <style>
4 td { padding-left: 5pt; padding-right: 5pt; }
5 th { padding-left: 5pt; padding-right: 5pt; }
6 code { white-space: pre-wrap; }
7 dd { white-space: pre-wrap; }
8 </style>
9 </head><body bgcolor="#FFFFFF">
10
11 <table border=0 cellpadding=0 cellspacing=0><tr><td bgcolor="#CCCC00"><table border=4 cellpadding=9><tr><td align=middle bgcolor="#000000"><font face="Palatino,Times" size=6 color="#999900"><b>
12 OT learning 2.9. Output distributions
13 </b></font></table></table>
14 <p>To ask the grammar to produce <i>many</i> outputs for a specified input form, and collect them in a <a href="Strings.html">Strings</a> object, you select an <a href="OTGrammar.html">OTGrammar</a> and choose <a href="OTGrammar__Input_to_outputs___.html">Input to outputs...</a>.</p>
15 <p>For example, select the object &#8220;OTGrammar assimilation&#8221; from our place assimilation example (<a href="OT_learning_2_6__Variable_output.html">&#167;2.6</a>), and click <b>Input to outputs...</b>. In the resulting command window, you specify 1000 trials, a noise strength of 2.0, and &#8220;an+pa&#8221; for the input form.</p>
16 <p>After you click <b>OK</b>, a <a href="Strings.html">Strings</a> object will appear in the list. If you click Info, you will see that it contains 1000 strings. If you click Inspect, you will see that most of the strings are &#8220;ampa&#8221;, but some of them are &#8220;anpa&#8221;. These are the output forms computed from 1000 evaluations for the input /an+pa/.</p>
17 <p>To count how many instances of [ampa] and [anpa] were generated, you select the <a href="Strings.html">Strings</a> object and click <a href="Strings__To_Distributions.html">To Distributions</a>. You will see a new <a href="Distributions.html">Distributions</a> object appear in the list. If you draw this to the Picture window (with <b>Draw as numbers...</b>), you will see something like:</p>
18 <dl>
19 <dd style="position:relative;padding-left:1em;text-indent:-2em"><table border=0 cellpadding=0 cellspacing=0><tr><td width=100 align=middle>ampa<td width=100 align=middle>815</table></dd>
20 <dd style="position:relative;padding-left:1em;text-indent:-2em"><table border=0 cellpadding=0 cellspacing=0><tr><td width=100 align=middle>anpa<td width=100 align=middle>185</table></dd>
21 </dl>
22 <p>which means that our grammar, when fed with 1000 /an+pa/ inputs, produced [ampa] 815 times, and [anpa] 185 times, which is consistent with our initial guess that a ranking difference of 2.7 would cause approximately an 80% - 20% distribution of [ampa] and [anpa].</p>
23 <h2>Checking the distribution hypothesis</h2>
24 <p>To see whether the guess of a 2.7 ranking difference is correct, we perform 1,000,000 trials instead of 1000. The output distribution (if you have enough memory in your computer) becomes something like (set the <i>Precision</i> to 7 in the <b>Draw</b> command window):</p>
25 <dl>
26 <dd style="position:relative;padding-left:1em;text-indent:-2em"><table border=0 cellpadding=0 cellspacing=0><tr><td width=100 align=middle>ampa<td width=100 align=middle>830080</table></dd>
27 <dd style="position:relative;padding-left:1em;text-indent:-2em"><table border=0 cellpadding=0 cellspacing=0><tr><td width=100 align=middle>anpa<td width=100 align=middle>169920</table></dd>
28 </dl>
29 <p>The expected values under the 80% - 20% distribution hypothesis are:</p>
30 <dl>
31 <dd style="position:relative;padding-left:1em;text-indent:-2em"><table border=0 cellpadding=0 cellspacing=0><tr><td width=100 align=middle>ampa<td width=100 align=middle>800000</table></dd>
32 <dd style="position:relative;padding-left:1em;text-indent:-2em"><table border=0 cellpadding=0 cellspacing=0><tr><td width=100 align=middle>anpa<td width=100 align=middle>200000</table></dd>
33 </dl>
34 <p>We compute (e.g. with <a href="Calculator___.html">Calculator...</a>) a <i>&#967;</i><sup>2</sup> of 30080<sup>2</sup>/800000 + 30080<sup>2</sup>/200000 = 5655.04, which, of course, is much too high for a distribution with a single degree of freedom. So the ranking difference must be smaller. If it is 2.4 (change the ranking of *G<font size=-1>ESTURE</font> to 102.4), the numbers become something like</p>
35 <dl>
36 <dd style="position:relative;padding-left:1em;text-indent:-2em"><table border=0 cellpadding=0 cellspacing=0><tr><td width=100 align=middle>ampa<td width=100 align=middle>801974</table></dd>
37 <dd style="position:relative;padding-left:1em;text-indent:-2em"><table border=0 cellpadding=0 cellspacing=0><tr><td width=100 align=middle>anpa<td width=100 align=middle>198026</table></dd>
38 </dl>
39 <p>which gives a <i>&#967;</i><sup>2</sup> of 24.35. By using the Calculator with the formula <code><font size=+1>chiSquareQ (24.35, 1)</font></code>, we find that values larger than this have a probability of 8&#183;10<sup>-7</sup> under the 80% - 20% distribution hypothesis, which must therefore be rejected again.</p>
40 <p>Rather than continuing this iterative procedure to find the correct ranking values for an 80% - 20% grammar, we will use the Gradual Learning Algorithm (<a href="OT_learning_5__Learning_a_stochastic_grammar.html">&#167;5</a>) to determine the rankings automatically, without any memory of past events other than the memory associated with maintaining the ranking values.</p>
41 <h2>Measuring all inputs</h2>
42 <p>To measure the outcomes of all the possible inputs at once, you select an <a href="OTGrammar.html">OTGrammar</a> and choose <a href="OTGrammar__To_output_Distributions___.html">To output Distributions...</a>. As an example, try this on our place assimilation grammar. You can supply 1000000 for the number of trials, and the usual 2.0 for the standard deviation of the noise. After you click <b>OK</b>, a <a href="Distributions.html">Distributions</a> object will appear in the list. If you draw this to the Picture window, the result will look like:</p>
43 <dl>
44 <dd style="position:relative;padding-left:1em;text-indent:-2em"><table border=0 cellpadding=0 cellspacing=0><tr><td width=100 align=middle>/an+pa/ &#8594; anpa<td width=100 align=middle>169855</table></dd>
45 <dd style="position:relative;padding-left:1em;text-indent:-2em"><table border=0 cellpadding=0 cellspacing=0><tr><td width=100 align=middle>/an+pa/ &#8594; ampa<td width=100 align=middle>830145</table></dd>
46 <dd style="position:relative;padding-left:1em;text-indent:-2em"><table border=0 cellpadding=0 cellspacing=0><tr><td width=100 align=middle>/at+ma/ &#8594; atma<td width=100 align=middle>999492</table></dd>
47 <dd style="position:relative;padding-left:1em;text-indent:-2em"><table border=0 cellpadding=0 cellspacing=0><tr><td width=100 align=middle>/at+ma/ &#8594; apma<td width=100 align=middle>508</table></dd>
48 </dl>
49 <p>We see that the number of [apma] outputs is not zero. This is due to the difference of 9.3 between the rankings of *R<font size=-1>EPLACE</font> (t, p) and *G<font size=-1>ESTURE</font>. If you rank *R<font size=-1>EPLACE</font> (t, p) at 116.0, the number of produced [apma] reduces to about one in a million, as you can easily check with some patience.</p>
50 <h3>Links to this page</h3>
51 <ul>
52 <li><a href="OT_learning.html">OT learning</a>
53 <li><a href="OT_learning_2__The_grammar.html">OT learning 2. The grammar</a>
54 </ul>
55 <hr>
56 <address>
57 <p>© ppgb 20110808</p>
58 </address>
59 </body>
60 </html>