@Test
	public void TestSequence3_1() throws Exception
	{
		Instances train = getSequence3(100, 100);
		Instances test1 = getSequence3(50, 100);
		//Instances test2 = getSequenceUniform(20, 100);
		
		HMM hmm = new HMM();
		
		hmm.setNumStates(6);
		hmm.setNumOutputs(6);
		
		double state0Probs[][] = new double[2][6];
		for (int c=0; c < 2; c++)
			for (int s=0; s < 6; s++)
				state0Probs[c][s]=0.0;
		state0Probs[0][0] = 1.0f;
		state0Probs[1][0] = 1.0f;
		
		double stateProbs[][][] = new double[2][6][6];
		for (int c=0; c < 2; c++)
			for (int ps=0; ps < 6; ps++)
				for (int s=0; s < 6; s++)
					stateProbs[c][ps][s]=0.0;
		
		for (int c=0; c < 2; c++)
		{
			for (int s=0; s < 5; s++)
			{
				stateProbs[c][s][s]=0.5;
				stateProbs[c][s][s+1]=0.5;
			}
			stateProbs[c][5][5] = 1.0;
		}
		
		hmm.initEstimatorsUnivariateDiscrete(2, state0Probs, stateProbs, null);	
		
		hmm.buildClassifier(train);
		Evaluation eval = new Evaluation(train);
		
		eval.evaluateModel(hmm, train);
		double errorRate = eval.errorRate();
		if(printErrorRates)
			System.out.println("Test Seq 3_1 error rate " + errorRate);
		// quite a high error rate as the models are similar
		assertTrue("error rate " + errorRate, errorRate < 0.4);
		
		eval.evaluateModel(hmm, test1);
		errorRate = eval.errorRate();
		if(printErrorRates)
			System.out.println("Test Seq 3_1 error rate " + errorRate);
		// quite a high error rate as the models are similar
		//System.out.println(errorRate);
		assertTrue("error rate " + errorRate, errorRate < 0.4);

	}