<html><head></head><body><div style="color:#000; background-color:#fff; font-family:times new roman, new york, times, serif;font-size:14px"><div id="yui_3_16_0_1_1444470509775_78857"><span>Hi,</span></div><div id="yui_3_16_0_1_1444470509775_78857"><br></div><div id="yui_3_16_0_1_1444470509775_78857">I had not specified the vocabulary for the model (spa.SPA()) and for the buffers, and was comparing the memory output to the default vocabulary of the model.</div><div id="yui_3_16_0_1_1444470509775_78857" dir="ltr">After specifying the same vocabulary consistently, both Fact0 and A*B give the same high similarity post cue-ing. So that solves the previous issue. Sorry for the traffic.</div><div id="yui_3_16_0_1_1444470509775_78857" dir="ltr"><br></div><div id="yui_3_16_0_1_1444470509775_78857" dir="ltr">Now however, I'm surprised that A and B have negative dot products (similarity) with A*B. I'd expect the dot product to be at least greater than zero. Or am I missing something?</div><div id="yui_3_16_0_1_1444470509775_78857" dir="ltr"><br></div><div id="yui_3_16_0_1_1444470509775_78857" dir="ltr">My code is updated at:</div><div id="yui_3_16_0_1_1444470509775_78857" dir="ltr"><a href="https://gist.github.com/adityagilra/c3077515722662499ff6" id="yui_3_16_0_1_1444470509775_79287">https://gist.github.com/adityagilra/c3077515722662499ff6</a><br></div><div id="yui_3_16_0_1_1444470509775_78857" dir="ltr"><br></div><div id="yui_3_16_0_1_1444470509775_78857" dir="ltr">Thanks,</div><div id="yui_3_16_0_1_1444470509775_78857" dir="ltr">Aditya.</div><div class="qtdSeparateBR" id="yui_3_16_0_1_1444470509775_79002"><br></div><div class="yahoo_quoted" id="yui_3_16_0_1_1444470509775_78994" style="display: block;"> <div style="font-family: times new roman, new york, times, serif; font-size: 14px;" id="yui_3_16_0_1_1444470509775_78993"> <div style="font-family: HelveticaNeue, Helvetica Neue, Helvetica, Arial, Lucida Grande, Sans-Serif; font-size: 16px;" id="yui_3_16_0_1_1444470509775_78992"> <div dir="ltr" id="yui_3_16_0_1_1444470509775_78998"> <font size="2" face="Arial" id="yui_3_16_0_1_1444470509775_79000"> On Tuesday, 13 October 2015 1:23 PM, Aditya Gilra <aditya_gilra@yahoo.com> wrote:<br> </font> </div> <blockquote style="border-left: 2px solid rgb(16, 16, 255); margin-left: 5px; margin-top: 5px; padding-left: 5px;" id="yui_3_16_0_1_1444470509775_78991">  <br><br> <div class="y_msg_container" id="yui_3_16_0_1_1444470509775_78990"><div id="yiv9980430899"><div id="yui_3_16_0_1_1444470509775_78989"><div style="color:#000;background-color:#fff;font-family:times new roman, new york, times, serif;font-size:14px;" id="yui_3_16_0_1_1444470509775_78988"><div id="yiv9980430899yui_3_16_0_1_1444470509775_56850"><font id="yiv9980430899yui_3_16_0_1_1444470509775_57035" size="3">Hi,</font></div><div id="yiv9980430899yui_3_16_0_1_1444470509775_56851"><font size="3"><br></font></div><div style="margin-top:0px;margin-bottom:0px;text-align:justify;font-family:'Helvetica Neue', Helvetica, Arial, sans-serif;line-height:20px;" id="yiv9980430899yui_3_16_0_1_1444470509775_56853" class="yiv9980430899"><font id="yiv9980430899yui_3_16_0_1_1444470509775_57040" size="3">I created a semantic pointer 'Fact0'='A*B' in the spa.Vocabulary facts by:<br style="margin:0px;padding:0px;" id="yiv9980430899yui_3_16_0_1_1444470509775_56855" class="yiv9980430899">facts.add('Fact0',facts.parse('A*B'))</font></div><div style="margin-top:0px;margin-bottom:0px;text-align:justify;font-family:'Helvetica Neue', Helvetica, Arial, sans-serif;line-height:20px;" id="yiv9980430899yui_3_16_0_1_1444470509775_56853" class="yiv9980430899"><font size="3"><br></font></div><div style="margin-top:0px;margin-bottom:0px;text-align:justify;font-family:'Helvetica Neue', Helvetica, Arial, sans-serif;line-height:20px;" id="yiv9980430899yui_3_16_0_1_1444470509775_56853" class="yiv9980430899"><font size="3">Then, I created an spa.AssociativeMemory with above vocabulary.<br style="margin:0px;padding:0px;" id="yiv9980430899yui_3_16_0_1_1444470509775_56857" class="yiv9980430899"></font></div><div style="margin-top:1em;margin-bottom:0px;text-align:justify;font-family:'Helvetica Neue', Helvetica, Arial, sans-serif;line-height:20px;" dir="ltr" id="yiv9980430899yui_3_16_0_1_1444470509775_56859" class="yiv9980430899"><font id="yiv9980430899yui_3_16_0_1_1444470509775_57039" size="3">Now when I query this associative memory with 'A*B' versus 'Fact0', I get very different responses!</font></div><div style="margin-top:1em;margin-bottom:0px;text-align:justify;font-family:'Helvetica Neue', Helvetica, Arial, sans-serif;line-height:20px;" dir="ltr" id="yiv9980430899yui_3_16_0_1_1444470509775_56859" class="yiv9980430899"><font id="yiv9980430899yui_3_16_0_1_1444470509775_57109" size="3">I'd expect the underlying neural activations to be the same for the two and the associative memory should return the same Fact0 match for both.<br style="margin:0px;padding:0px;" id="yiv9980430899yui_3_16_0_1_1444470509775_56863" class="yiv9980430899">Why this difference?</font></div><div id="yiv9980430899yui_3_16_0_1_1444470509775_56875"><font size="3"><br></font></div><div id="yiv9980430899yui_3_16_0_1_1444470509775_56812" dir="ltr" class="yiv9980430899"><font id="yiv9980430899yui_3_16_0_1_1444470509775_57037" size="3">My code is at:<a rel="nofollow" target="_blank" href="https://gist.github.com/adityagilra/c3077515722662499ff6" id="yiv9980430899yui_3_16_0_1_1444470509775_56810" class="yiv9980430899"><br class="yiv9980430899" id="yiv9980430899yui_3_16_0_1_1444470509775_56880">https://gist.github.com/adityagilra/c3077515722662499ff6</a><br id="yiv9980430899yui_3_16_0_1_1444470509775_56882" class="yiv9980430899"></font></div><div dir="ltr" id="yiv9980430899yui_3_16_0_1_1444470509775_56884" class="yiv9980430899"><font size="3"><br id="yiv9980430899yui_3_16_0_1_1444470509775_56886" class="yiv9980430899"></font></div><div dir="ltr" id="yiv9980430899yui_3_16_0_1_1444470509775_56884" class="yiv9980430899"><font size="3">Thanks,</font></div><div dir="ltr" id="yiv9980430899yui_3_16_0_1_1444470509775_56884" class="yiv9980430899"><font id="yiv9980430899yui_3_16_0_1_1444470509775_57140" size="3">Aditya.</font></div></div></div></div><br><br></div> </blockquote>  </div> </div>   </div></div></body></html>