GRAPHICAL_MODEL sample
% Simple GMTKL template for an HMM. 
% The first frame, starting at index 0 
frame: 0 { 
	% variable s in first frame 
	variable : s { 
		type : discrete hidden cardinality 3; 

		% s at frame 0 has no switching parents. 
		switchingparents : nil; 

		% s at frame 0 has no normal parents. 
		% pi is the name of the conditional probability table (CPT) 
		% containing the parameters for this variable. Since 
		% the variable has no parents, it is only a 1-D table. 
		conditionalparents : nil using DenseCPT("pi"); 
	}

	% variable observation in first frame 
	variable : o { 
		% observation is discrete multinomial
		type : discrete observed 0:0 cardinality 4; 
		% observation at frame 0 has one parent, s(0). 
		% Note that s(0) refers to the s variable 
		% in the current frame. 
		switchingparents : nil; 

		conditionalparents : s(0) using DenseCPT("b") ;
	} 
} 

% The second frame 
frame: 1 { 
	% variable s in second frame 
	variable : s { 
		type : discrete hidden cardinality 3; 

		switchingparents : nil; 

		% In this case, s in the second frame has 
		% as a parent s(-1) which means the s 
		% variable one time frame preceeding this one. In other 
		% words, when a variable named var is specified 
		% as var(n) to designate a parent, the n is 
		% the relative frame offset. If n=0, it refers 
		% to the variable named var in the current frame, 
		% if n=-1, it refers to the previous frame. Other 
		% values of n (both positive and negative) are also 
		% possible. 
		conditionalparents : s(-1) using DenseCPT("a"); 
	} 
	
	% variable observation in second frame 
	variable : o { 
		type : discrete observed 0:0 cardinality 4; 

		% observation at frame 1 has one parent, s(0) 
		% Note that s(0) refers to the s variable 
		% in the current frame, which in this case is frame 1. 

		switchingparents : nil; 

		conditionalparents : s(0) using DenseCPT("b");
		} 
} 

% The chunk specifier, saying only that 
% frame 1 is the chunk to be repeated. 
chunk 1:1; 

