Alfred Yu
unread,Nov 23, 2010, 10:26:35 PM11/23/10Sign in to reply to author
Sign in to forward
You do not have permission to delete messages in this group
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to Sequence Memoizer
Hi,all
I have some doubts about the SM. I may misunderstand the model
of SM.After reading the paper about SM, I think SM should has the
capacity to predict the sequence. Say if we feed the SM with sequence
"abc,abc,abc,abc,",and if we want to predict the next word of "ab", I
think it should return 'c'. But as I run this on SM ,the output is
'a'. I am sure I have some mistakes here. Could anyone point out
what's wrong in above statement? Or is that there is something wrong
with my code. I appreciate your help. Thank you very much.
The code is here:
"
import edu.columbia.stat.wood.pub.sequencememoizer.*;
gettysburg_address = ['abc,abc,abc,abc,abc'];
int_gettysburg_address = uint8(gettysburg_address);
vocab_size = max(int_gettysburg_address)+1; %sequence memoizer is 0-
based, not 1-based
ismp = IntSequenceMemoizerParameters(vocab_size);
sm = IntSequenceMemoizer(ismp);
sm.continueSequence(int_gettysburg_address);
num_samples = 100;
sm.sample(num_samples);
forwardSample = sm.generateSequence(int_gettysburg_address(1:2),1);
%predict 'ab'
forwardSampleText = char(forwardSample);
disp(forwardSampleText');
"