{ "cells": [ { "cell_type": "markdown", "metadata": {}, "source": [ "## Hidden Markov Model (HMM)\n", "\n", "\n", "An implementation of the first-order Hidden Markov Model (HMM)." ] }, { "cell_type": "code", "execution_count": 1, "metadata": {}, "outputs": [], "source": [ "import random\n", "import math\n", "import numpy as np" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "### Utility functions\n", "\n", "Utility functions for I/O and common operations." ] }, { "cell_type": "code", "execution_count": 2, "metadata": {}, "outputs": [], "source": [ "def pretty_print_matrix(A, round_to):\n", " for row in A:\n", " row_rounded = [round(el, round_to) for el in row]\n", " print(' '.join(map(str, row_rounded)))\n", "\n", "\n", "def line_to_matrix(line):\n", " \"\"\" Convert a matrix in string format (one line) to a nested list.\n", " \n", " Parameters\n", " ----------\n", " line : str\n", " A list in string denoting a matrix, where the first element is the number of rows,\n", " the second element is the number of columns, and the rest of the elements are the\n", " matrix entries in row-first order.\n", " \n", " Returns\n", " -------\n", " matrix : list\n", " A nested list (2D) of floats, i.e.: matrix.\n", " \"\"\"\n", " # Initalize list.\n", " matrix = []\n", " \n", " # Get number of rows and columns.\n", " n_rows, n_cols = int(line[0]), int(line[1])\n", " \n", " # Convert the row-first matrix entries into a 1D list and explicitly cast\n", " # entries into float.\n", " line = list(map(float, line[2:]))\n", " \n", " # Convert the row-first 1D list into a nested (2D) list.\n", " for n_row in range(n_rows):\n", " current_row = line[n_row*n_cols:(n_row+1)*n_cols]\n", " matrix.append(current_row)\n", " \n", " return matrix\n", "\n", "\n", "def line_to_emission_sequence(line):\n", " \"\"\" Convert an emission sequence in string format (one line) to a list.\n", " \n", " Parameters\n", " ----------\n", " line : str\n", " A list in string denoting an emission sequence, where the first element is the number of \n", " emissions.\n", " \n", " Returns\n", " -------\n", " emission_sequence : list\n", " A list (1D) of ints, i.e.: matrix.\n", " \"\"\"\n", " # The first element is the number of emissions. Get the emissions and explicitly\n", " # cast them into int.\n", " emission_sequence = list(map(int, line[1:]))\n", " \n", " return emission_sequence\n", "\n", "\n", "def read_input_HMM1(lines, read_A, read_B, read_pi, read_emission_sequence):\n", " \"\"\" Read pi, A, and B that define a HMM.\n", " \n", " Parameters\n", " ----------\n", " lines : list\n", " A list of strings where each strrring is a matrix, where the first element is the number of rows,\n", " the second element is the number of columns, and the rest of the elements are the\n", " matrix entries in row-first order.\n", " read_A : bool\n", " True if A is read.\n", " read_B : bool\n", " True if B is read.\n", " read_pi : bool\n", " True if pi is read.\n", " read_emission_sequence : bool\n", " True if emission sequence is read.\n", " \n", " Returns\n", " -------\n", " A : list\n", " A nested list (2D), i.e.: matrix.\n", " B : list\n", " A nested list (2D), i.e.: matrix.\n", " pi : list\n", " A list (1D), i.e.: matrix.\n", " \"\"\"\n", " # Initalize A, B, and pi to None in order to check if they were successfully read before return.\n", " A = None\n", " B = None\n", " pi = None\n", " emissions_sequence = None\n", " \n", " # Iterate over the lines, and read and convert them into A, B, and pi.\n", " for idx, line in enumerate(lines):\n", " # First line is A.\n", " if idx == 0 and read_A:\n", " A = line_to_matrix(line=line)\n", " # Second line is B.\n", " elif idx == 1 and read_B:\n", " B = line_to_matrix(line=line)\n", " # Third line is pi.\n", " elif idx == 2 and read_pi:\n", " pi = flatten_mat(line_to_matrix(line=line))\n", " # Fourth line is emission sequence.\n", " elif idx == 3 and read_emission_sequence:\n", " emissions_sequence = line_to_emission_sequence(line=line)\n", " # If more lines than 4, raise Exception.\n", " elif 3 < idx:\n", " raise Exception\n", " else:\n", " pass\n", " \n", " # Assert that A, B, pi are all read.\n", " assert A is not None and B is not None and pi is not None or emissions_sequence is not None\n", " \n", " return A, B, pi, emissions_sequence\n", "\n", "\n", "def matrix_to_line(A):\n", " n_rows_str = str(int(len(A)))\n", " n_cols_str = str(int(len(A[0])))\n", " \n", " A_flat = [str(round(el, 8)) for row in A for el in row]\n", "\n", " return n_rows_str + ' ' + n_cols_str + ' ' + ' '.join(A_flat) + \"\\n\"\n", " \n", " \n", "def probability_to_line(p):\n", " return round(p, 20)\n", "\n", "\n", "def state_sequence_to_line(state_sequence):\n", " return ' '.join(list(map(str, state_sequence)))" ] }, { "cell_type": "code", "execution_count": 3, "metadata": {}, "outputs": [], "source": [ "def el_wise_prod(a,b):\n", " assert len(a) == len(b), \"El wise prod dim. issue\"\n", " return [[a_el*b_el for a_el, b_el in zip(a, b)]]\n", "\n", "def el_wise_mat(A,B):\n", " return [flatten_mat(el_wise_prod(a,b)) for a,b in zip(A,B)]\n", "\n", "def dot_prod(a, b):\n", " assert len(a) == len(b), \"Dot prod dim. issue\"\n", " return sum([a_el*b_el for a_el, b_el in zip(a, b)])\n", "\n", "def mat_transpose(A):\n", " return [list(row) for row in list(zip(*A))]\n", "\n", "def mat_mul(A, B):\n", " A_col = len(A[0])\n", " B_col = len(B[0])\n", " A_row = len(A)\n", " B_row = len(B)\n", " assert A_col == B_row, \"Matrix dimensions problem\"\n", " \n", " return [[dot_prod(a_row, b_col) for b_col in mat_transpose(B)] for a_row in A]\n", "\n", "def flatten_mat(A):\n", " return [el for row in A for el in row] " ] }, { "cell_type": "code", "execution_count": 4, "metadata": {}, "outputs": [], "source": [ "def read_in_file(filename):\n", " \"\"\" Read in file and process its content to intreact with programatically.\n", " \n", " Parameters\n", " ----------\n", " filename : str\n", " The file name of the in file.\n", " \n", " Returns\n", " -------\n", " lines : list\n", " A nested list (2D) in which each sub-list containt a matrix. \n", " 1st is no. of rows, 2nd is no. columns. The entries are in row-first order.\n", " \"\"\"\n", " # Try to open in file, if any issue, raise Exception.\n", " try:\n", " lines_txt = open(filename).readlines()\n", " except:\n", " raise Exception(f'{filename} is not found, or there is a problem with it.')\n", " \n", " # Split the lines into lists on spaces, and explicitly cast entries into float.\n", " # lines is a list of list where each sub-list includes a matrix in a string format. \n", " lines = [list(map(float, str.strip(line_txt).split(\" \"))) for line_txt in lines_txt]\n", "\n", " return lines" ] }, { "cell_type": "code", "execution_count": 5, "metadata": {}, "outputs": [], "source": [ "class HMM():\n", " \"\"\" A class to abstractly define a (first-order) Hidden Markov Model (HMM).\n", " \n", " Parameters\n", " ----------\n", " filename : str\n", " The file name of the in file.\n", " \n", " Returns\n", " -------\n", " lines : list\n", " A nested list (2D) in which each sub-list containt a matrix. \n", " 1st is no. of rows, 2nd is no. columns. The entries are in row-first order.\n", " \"\"\"\n", " def __init__(self, pi, A, B):\n", " \"\"\" Initalize HMM with pi, A, and B.\n", " \n", " Parameters\n", " ----------\n", " pi : list\n", " List (1D) of initial hidden state probability distribution.\n", " A : list\n", " Nested list (2D) of state transition probabilities. The jth entry in the \n", " ith row shows the probability of moving from the ith state to the jth state.\n", " Shape is number of hidden states times the number of hidden states.\n", " B : list\n", " Nested list (2D) of emission probabilities. The jth entry in the \n", " ith row shows the probability of observing the jth obsevable while in hidden state i.\n", " Shape is number of hidden states times the number of observables.\n", " \"\"\"\n", " # Assert that the number of rows is the same in A and B.\n", " assert len(A) == len(B), \"[ERROR] HMM initialization issue\"\n", " \n", " # Assign some useful stuff.\n", " # The number of hidden states.\n", " self.n_hidden_states = len(A)\n", " # The identifiers (starts at 0) of the hidden states.\n", " self.hidden_states = [i for i in range(self.n_hidden_states)]\n", " # The number of observables/emissions.\n", " self.n_emissions = len(B[0])\n", " # The identifiers (starts at 0) of the observables/emissions.\n", " self.emissions = [i for i in range(self.n_emissions)]\n", " # pi, A, and B as object attributes.\n", " self.pi = pi\n", " self.A = A\n", " self.B = B\n", " \n", " \n", " @classmethod\n", " def from_known_model(cls, pi, A, B):\n", " \"\"\" Initalize HMM with known pi, A, and B, i.e.: defined model.\n", " \n", " Parameters\n", " ----------\n", " pi : list\n", " List (1D) of initial hidden state probability distribution.\n", " A : list\n", " Nested list (2D) of state transition probabilities. The jth entry in the \n", " ith row shows the probability of moving from the ith state to the jth state.\n", " Shape is number of hidden states times the number of hidden states.\n", " B : list\n", " Nested list (2D) of emission probabilities. The jth entry in the \n", " ith row shows the probability of observing the jth obsevable while in hidden state i.\n", " Shape is number of hidden states times the number of observables.\n", "\n", " Returns\n", " -------\n", " cls : class\n", " The HMM class initialized with pi, A, and B.\n", " \"\"\"\n", " return cls(pi, A, B)\n", " \n", " \n", " @classmethod\n", " def from_unknown_model(cls, N, M, init_uniform):\n", " \"\"\" Initalize HMM with unknown pi, A, and B, i.e.: undefined model with initialized parameters.\n", " Used as the initialization of the Baum-Welch algorithm for learning HMM parameters given a \n", " sequence of states.\n", " \n", " Parameters\n", " ----------\n", " N : int\n", " The number of hidden states.\n", " M : int\n", " The number of observables.\n", " init_uniform : bool\n", " Boolean whether to initialize HMM with uniformly distributed pi, A, and B. Bad idea...\n", "\n", " Returns\n", " -------\n", " cls : class\n", " The HMM class initialized with pi, A, and B.\n", " \"\"\"\n", " # Threshold for checking if initial parameter matrices are row-stochastic.\n", " threshold = 10e-3\n", " \n", " # Range for sampling random numbers.\n", " range_random = range(950,1051)\n", " \n", " # Ininitalize pi, A, and B with either unfiformly or randomly distributed parameters.\n", " # Maybe Gaussian rather than random???\n", " if init_uniform:\n", " A_unnorm = [[1 for i in range(N)] for j in range(N)]\n", " B_unnorm = [[1 for i in range(M)] for j in range(N)]\n", " pi_unnorm = [1 for i in range(N)]\n", " else:\n", " A_unnorm = [random.sample(range_random, N) for i in range(N)]\n", " B_unnorm = [random.sample(range_random, M) for i in range(N)]\n", " pi_unnorm = random.sample(range_random, N)\n", " \n", " # Normalize rows in matrices for them to be row-stochastic (definition of HMM).\n", " A = [[i/sum(row) for i in row] for row in A_unnorm]\n", " B = [[i/sum(row) for i in row] for row in B_unnorm]\n", " pi = [i/sum(pi_unnorm) for i in pi_unnorm]\n", "\n", " # Assert dimensions of pi, A, and B, and if they are row-stochastic.\n", " assert len(A) == N and len(A[0]) == N and all([1.0 - sum(row) < threshold for row in A]), \"Issues with init A\"\n", " assert len(B) == N and len(B[0]) == M and all([1.0 - sum(row) < threshold for row in B]), \"Issues with init B\"\n", " assert len(pi) == N and 1.0 - sum(pi) < threshold, \"Issues with init pi\"\n", " \n", " return cls(pi, A, B)\n", " \n", " \n", " @classmethod\n", " def from_unknown_model_gauss(cls, N, M, init_uniform):\n", " \"\"\" Initalize HMM with unknown pi, A, and B, i.e.: undefined model with initialized parameters.\n", " Used as the initialization of the Baum-Welch algorithm for learning HMM parameters given a \n", " sequence of states.\n", " \n", " Parameters\n", " ----------\n", " N : int\n", " The number of hidden states.\n", " M : int\n", " The number of observables.\n", " init_uniform : bool\n", " Boolean whether to initialize HMM with uniformly distributed pi, A, and B. Bad idea...\n", "\n", " Returns\n", " -------\n", " cls : class\n", " The HMM class initialized with pi, A, and B.\n", " \"\"\"\n", " # Threshold for checking if initial parameter matrices are row-stochastic.\n", " threshold = 10e-3\n", " \n", " A_unnorm = np.random.uniform(100, 101, (N,N)) + np.random.normal(0,0.5,(N,N))\n", " A = [[i/sum(row) for i in row] for row in list(A_unnorm)]\n", " \n", " B_unnorm = np.random.uniform(100, 101, (N,M)) + np.random.normal(0,0.5,(N,M))\n", " B = [[i/sum(row) for i in row] for row in list(B_unnorm)]\n", " \n", " pi_unnorm = list(np.random.uniform(100, 101, N) + np.random.normal(0,0.5,N))\n", " pi = [i/sum(pi_unnorm) for i in list(pi_unnorm)]\n", "\n", "\n", " # Assert dimensions of pi, A, and B, and if they are row-stochastic.\n", " assert len(A) == N and len(A[0]) == N and all([1.0 - sum(row) < threshold for row in A]), \"Issues with init A\"\n", " assert len(B) == N and len(B[0]) == M and all([1.0 - sum(row) < threshold for row in B]), \"Issues with init B\"\n", " assert len(pi) == N and 1.0 - sum(pi) < threshold, \"Issues with init pi\"\n", " \n", " return cls(pi, A, B)\n", " \n", " \n", " @classmethod\n", " def from_unknown_model_given_init(cls, pi_init, A_init, B_init):\n", " \"\"\" Initalize HMM with given initalization parameters pi_init, A_init, and B_init.\n", " \n", " Parameters\n", " ----------\n", " pi_init : list\n", " List (1D) of initial hidden state probability distribution.\n", " A_init : list\n", " Nested list (2D) of state transition probabilities. The jth entry in the \n", " ith row shows the probability of moving from the ith state to the jth state.\n", " Shape is number of hidden states times the number of hidden states.\n", " B_init : list\n", " Nested list (2D) of emission probabilities. The jth entry in the \n", " ith row shows the probability of observing the jth obsevable while in hidden state i.\n", " Shape is number of hidden states times the number of observables.\n", "\n", " Returns\n", " -------\n", " cls : class\n", " The HMM class initialized with pi_init, A_init, and B_init.\n", " \"\"\"\n", " return cls(pi_init, A_init, B_init)\n", " \n", " def next_state_distribution(self, state_distribution, A):\n", " \"\"\" Compute hidden state distribution at next time step.\n", " \n", " Parameters\n", " ----------\n", " state_distribution : list\n", " List (1D) of initial hidden state probability distribution.\n", " A : list\n", " Nested list (2D) of state transition probabilities. The jth entry in the \n", " ith row shows the probability of moving from the ith state to the jth state.\n", " Shape is number of hidden states times the number of hidden states.\n", "\n", " Returns\n", " -------\n", " list\n", " The probability distribution of the next hidden states.\n", " \"\"\"\n", " return flatten_mat(mat_mul(A=[state_distribution], B=A))\n", " \n", " def next_emission_distribution(self, state_distribution, B):\n", " \"\"\" Compute the probability distribution of emissions at current timecstep.\n", " \n", " Parameters\n", " ----------\n", " state_distribution : list\n", " List (1D) of initial hidden state probability distribution.\n", " B : list\n", " Nested list (2D) of emission probabilities. The jth entry in the \n", " ith row shows the probability of observing the jth obsevable while in hidden state i.\n", " Shape is number of hidden states times the number of observables.\n", "\n", " Returns\n", " -------\n", " list\n", " The probability distribution of the emissions states.\n", " \"\"\"\n", " return flatten_mat(mat_mul(A=[state_distribution], B=B))\n", " \n", " def alpha_pass(self, emission_sequence, scale=True):\n", " \"\"\" Alpha-pass or forward algorithm of HMM. For each time step t, find the probabilities\n", " that the Markov process is in state i given the emission sequence from the initial to the tth\n", " timestep.\n", " \n", " Parameters\n", " ----------\n", " emission_sequence : list\n", " List of ints where each entry is the id of the observable/emission at time step t.\n", " \n", " scale : bool\n", " Boolean whether to scale the probabilities during alpha pass. Each time step has their own\n", " scaler. Useful in the case of long emission sequences when it is important to preserve \n", " numerical stability due to machine precision. Should be set to true always. \n", "\n", " Returns\n", " -------\n", " scalers : list\n", " List (1D) of floats where each entry is the scaler of the probbailities in the alpha pass\n", " at time step t. Each time step has their own scaler. \n", " Useful in the case of long emission sequences when it is important to preserve avoid \n", " underflow due to machine precision (products of small probabilities).\n", " \n", " alpha_store : list\n", " Nested list (2D) where each sub-list (iterate on t) includes the probabilities (iterate on i)\n", " of the Markov process being in state i given the emission sequence upto time step t.\n", " \"\"\"\n", " # Initialize the alpha pass.\n", " # Get the first emission.\n", " e_init = emission_sequence[0]\n", " \n", " # Get the column from B that corresponds to the first emission.\n", " b_col_init = [row[e_init] for row in self.B]\n", " \n", " # Initialize the scaler for the first time step.\n", " c0 = 0\n", " \n", " # Initialize the scaler list.\n", " scalers = []\n", " \n", " # Initialize the first alpha list.\n", " alpha_init = [None for i in range(self.n_hidden_states)]\n", " \n", " # For cleaner code, retrieve pi.\n", " pi = self.pi\n", " \n", " # Compute the first alpha list (at the first time step) and its sclaler.\n", " for i in range(self.n_hidden_states):\n", " alpha_init[i] = pi[i]*b_col_init[i]\n", " c0 = c0 + alpha_init[i]\n", " \n", " # Invert scaler to be within (0, 1].\n", " c0 = 1/c0\n", " \n", " # Append the first scaler to the scaler list.\n", " scalers.append(c0)\n", " \n", " if scale:\n", " # Scale each probability in the first alpha list. \n", " for i in range(self.n_hidden_states):\n", " alpha_init[i] = c0*alpha_init[i]\n", "\n", " # Initialize a list to store all of the alpha lists.\n", " alpha_store = []\n", " \n", " # Append the first alpha list to the alphas list.\n", " alpha_store.append(alpha_init)\n", " \n", " # Initialize the general alpha list at time step t.\n", " alpha_t = [0 for i in range(self.n_hidden_states)]\n", " \n", " # Initilaize the general alpha list at time step t minus 1 with the first\n", " # alpha list.\n", " alpha_t_min_1 = alpha_init.copy()\n", " \n", " # Compute the alpha lists from the 2nd time step (i.e.: t=1 for zero indexed t).\n", " for t in range(1, len(emission_sequence)):\n", " \n", " # Reinitialize the alpha list at time step t.\n", " alpha_t = [None for i in range(self.n_hidden_states)]\n", " \n", " # Get the emission at time step t.\n", " e = emission_sequence[t]\n", " \n", " # Get the column from B that corresponds to tth emission.\n", " b_col = [row[e] for row in self.B]\n", " \n", " # Initialize the scaler for the tth time step.\n", " ct = 0\n", " \n", " # Compute the tht alpha list (at the tth time step) and its sclaler.\n", " for i in range(self.n_hidden_states):\n", " alpha_t[i] = 0\n", " for j in range(self.n_hidden_states):\n", " alpha_t[i] = alpha_t[i] + alpha_t_min_1[j] * self.A[j][i]\n", " \n", " alpha_t[i] = alpha_t[i] * b_col[i]\n", " ct = ct + alpha_t[i]\n", " \n", " # Scale each probability in the tth alpha list.\n", " ct = 1 / ct\n", " scalers.append(ct)\n", "\n", " if scale:\n", " for i in range(self.n_hidden_states):\n", " alpha_t[i] = ct * alpha_t[i]\n", "\n", " # Copy the th alpha list to the t minus 1 th alpha list.\n", " alpha_t_min_1 = alpha_t.copy()\n", " \n", " # Append the tth alpha list to the alphas.\n", " alpha_store.append(alpha_t)\n", " \n", " return scalers, alpha_store\n", " \n", " \n", " def beta_pass(self, scalers, emission_sequence, scale=True):\n", " \"\"\" Beta-pass or backward algorithm of HMM. For each time step t, find the probabilities\n", " that the Markov process is in state i given the emission sequence from the last emission at\n", " time step T down to the tth timestep.\n", " \n", " Parameters\n", " ----------\n", " scalers : list\n", " List of floats where each entry is the scaler (derived during the alpha-pass) of the\n", " tth time step.\n", " \n", " emission_sequence : list\n", " List of ints where each entry is the id of the observable/emission at time step t.\n", " \n", " scale : bool\n", " Boolean whether to scale the probabilities during alpha pass. Each time step has their own\n", " scaler. Useful in the case of long emission sequences when it is important to preserve \n", " numerical stability due to machine precision. Should be set to true always. \n", "\n", " Returns\n", " ------- \n", " list\n", " Nested list (2D) where each sub-list (iterate on t) includes the probabilities (iterate on i)\n", " of the Markov process being in state i given the emission sequence from the last \n", " time step T down to time step t.\n", " It is the reversed list of the beta lists derived during the beta pass (iterating from\n", " time step T to t).\n", " \"\"\"\n", " # Assert the scalers and the emission sequence have the same length.\n", " assert len(scalers) == len(emission_sequence), \"Scalers and emission sequence are diff. length\"\n", " \n", " if scale:\n", " # Initialize the beta list for the last Tth time step.\n", " # If scale beta pass, do the initialization with scaling.\n", " beta_init = [scalers[-1] for i in range(self.n_hidden_states)]\n", " else:\n", " beta_init = [1 for i in range(self.n_hidden_states)]\n", "\n", " # Initialize the general tth beta list (on time step t).\n", " beta_t = [None for i in range(self.n_hidden_states)]\n", " \n", " # Initialize the general t plus 1 th beta list (on time step t+1).\n", " beta_t_plus_1 = beta_init.copy()\n", " \n", " # Initialize the list of beta lists.\n", " beta_store = []\n", " \n", " # Append the initialized, last beta list to the betas.\n", " beta_store.append(beta_init)\n", " \n", " # Iterate over the time steps from last (T) down to the first one.\n", " for t in range(len(emission_sequence)- 2, -1, -1):\n", " # Reinitialize the beta list at time step t.\n", " beta_t = [None for i in range(self.n_hidden_states)]\n", " \n", " # Compute the beta list at time step t and its scaler.\n", " for i in range(self.n_hidden_states):\n", " \n", " beta_t[i] = 0\n", " \n", " for j in range(self.n_hidden_states):\n", " \n", " b_col = [row[emission_sequence[t+1]] for row in self.B]\n", " \n", " beta_t[i] = beta_t[i] + self.A[i][j]*b_col[j]*beta_t_plus_1[j]\n", " \n", " if scale:\n", " # Scale the prbbaility of the ith hidden state in the tth beta pass.\n", " beta_t[i] = scalers[t] * beta_t[i]\n", "\n", " # Copy the tth beta list to the t plus 1 th beta list.\n", " beta_t_plus_1 = beta_t.copy()\n", " \n", " # Append the th beta list to the betas.\n", " beta_store.append(beta_t)\n", " \n", " return list(reversed(beta_store))\n", " \n", " \n", " def probability_of_emission_sequence(self, emission_sequence):\n", " \"\"\" Computes the probability that a full emission sequence occurs given the HMM parameters.\n", " \n", " Parameters\n", " ----------\n", " emission_sequence : list\n", " List of ints where each entry is the id of the observable/emission at time step t.\n", " \n", " Returns\n", " ------- \n", " float\n", " The probability of the emission sequence.\n", " \"\"\"\n", " # Alpha-pass, but DO NOT SCALE as the scaled version is not the real probability.\n", " scalers, alpha_store = self.alpha_pass(emission_sequence=emission_sequence, scale=False)\n", " \n", " # The sum over N of the probabilities of being in state i at time step T \n", " # is the probability of observing the emission sequence.\n", " return sum(alpha_store[-1])\n", " \n", " \n", " def delta_step(self, delta_in, emission):\n", " # Get the column in B that corresponds to the current emission.\n", " b_col = [[row[emission] for row in self.B]]\n", " \n", " # Intermediate computational result (shape is NxN).\n", " intermediate = mat_mul(mat_transpose(b_col), delta_in)\n", " \n", " # Get the delta nedted list (shape is NxN).\n", " delta_mat = el_wise_mat(intermediate, mat_transpose(A))\n", " \n", " # Get the maximum probability in the delta list.\n", " max_prob = [[max(row) for row in delta_mat]]\n", " \n", " \n", " argmax_state = [[row.index(max(row)) if 0 < max(row) else None for row in delta_mat]]\n", " \n", " print(max_prob)\n", " print(argmax_state)\n", " \n", " return (max_prob, argmax_state)\n", " \n", " \n", " def estimate_sequence_of_states_based_on_emission_sequence(self, emission_sequence):\n", " # Init\n", " e_init = emission_sequence[0]\n", " b_col = [row[e_init] for row in self.B]\n", " \n", " delta_0 = el_wise_prod(self.pi, b_col)\n", " \n", " \n", " delta_current = delta_0.copy()\n", " \n", " delta_current_register = []\n", " delta_states_register = []\n", " \n", " for step, e in zip(range(1,len(emission_sequence),1), emission_sequence[1:]):\n", " delta_info = self.delta_step(delta_in=delta_current, emission=e)\n", " delta_current = delta_info[0]\n", " delta_states = delta_info[1]\n", " \n", " delta_current_register.append(flatten_mat(delta_current))\n", " delta_states_register.append(flatten_mat(delta_states))\n", " \n", " estimated_state_sequence_reversed = []\n", " \n", " delta_current_register_reversed = list(reversed(delta_current_register))\n", " delta_states_register_reversed = list(reversed(delta_states_register))\n", " \n", " last_deltas = delta_current_register_reversed[0]\n", " last_max_p = max(last_deltas)\n", " last_state_idx = last_deltas.index(last_max_p)\n", " last_state = self.hidden_states[last_state_idx]\n", " \n", " estimated_state_sequence_reversed.append(last_state)\n", "\n", " state_idx = last_state_idx\n", " state = last_state\n", " \n", " for states in delta_states_register_reversed:\n", " \n", " state = states[state_idx]\n", " state_idx = self.hidden_states.index(state)\n", " \n", " estimated_state_sequence_reversed.append(state)\n", " \n", " return list(reversed(estimated_state_sequence_reversed))\n", " \n", " \n", " def compute_gammas(self, alpha_store, beta_store, emission_sequence):\n", " \"\"\" The Expectation part of the Baum-Welch algorithm. \n", " Given the current HMM parameter estimation, the gamma matrix (shape is TxN) \n", " gives the probability at time step t (in T rows) of being in state i \n", " (in N columns) given the emission sequence.\n", " The di-gamma tensor (shape is TxNxN) gives the probability at time step t (in T rows)\n", " of being in state i (in N rows) and at time step t+1 being in state j (in N columns).\n", " The gamma and the di-gamma tensors provide an expectation for computing the updated \n", " HMM parameters.\n", " \n", " Parameters\n", " ----------\n", " alpha_store : list\n", " List of lists (2D, shape is TxN) where each sub-list is the alpha list at time step t.\n", " \n", " beta_store : list\n", " List of lists (2D, shape is TxN) where each sub-list is the beta list at time step t.\n", " \n", " emission_sequence : list\n", " List of ints where each entry is the id of the observable/emission at time step t.\n", "\n", " Returns\n", " ------- \n", " di_gamma : list\n", " Nested list (3D, shape is TxNxN) where each sub-list is a nested list (2D) of the expected\n", " transition matrix.\n", " It is the reversed list of the beta lists derived during the beta pass (iterating from\n", " time step T to t).\n", " \n", " gamma: list\n", " Nested list (2D, shape is TxN) where each sub-list is the list of probbailities of \n", " being in state i (in N) given the full emission sequence.\n", " \"\"\"\n", " # Assert that there are as many alpha lists and beta lists.\n", " assert len(alpha_store) == len(beta_store)\n", " \n", " # Initialize the di-gamma tensor (3D, shape is TxNxN).\n", " di_gamma = \\\n", " [[[None for j in range(self.n_hidden_states)] for i in range(self.n_hidden_states)] \n", " for t in range(len(emission_sequence))] \n", " \n", " # Initalize gamma matrix / nested list (2D, shape is TxN).\n", " gamma = [[None for i in range(self.n_hidden_states)] for t in range(len(emission_sequence))]\n", " \n", " # Iterate over each emission.\n", " for t in range(len(emission_sequence) - 1):\n", " \n", " # Iterate over each hidden state.\n", " for i in range(self.n_hidden_states):\n", " \n", " # Initalize current gamma value.\n", " gamma[t][i] = 0\n", " \n", " # Select the column from B that corresponds to the current emission.\n", " b_col = [row[emission_sequence[t+1]] for row in self.B]\n", " \n", " # Iterate over the hidden states.\n", " for j in range(self.n_hidden_states):\n", " \n", " # Compute the current di-gamma and gamma value.\n", " di_gamma[t][i][j] = alpha_store[t][i] * self.A[i][j] * b_col[j] * beta_store[t+1][j]\n", " gamma[t][i] = gamma[t][i] + di_gamma[t][i][j]\n", " \n", " # Iterate over the hidden states.\n", " for i in range(self.n_hidden_states):\n", " gamma[len(emission_sequence) - 1][i] = alpha_store[len(emission_sequence) - 1][i]\n", " \n", " # Assert dimensions (although since I initalized them, it doesn't make much sense, anyway...)\n", " assert len(di_gamma) == len(emission_sequence) and len(di_gamma[0]) == self.n_hidden_states and \\\n", " len(di_gamma[0][0]) == self.n_hidden_states\n", " \n", " assert len(gamma) == len(emission_sequence) and len(di_gamma[0]) == self.n_hidden_states\n", " \n", " return di_gamma, gamma\n", " \n", " \n", " def reestimate_pi_A_B(self, emission_sequence, scalers, alpha_store, beta_store, di_gamma, gamma):\n", " \"\"\" Reestimate the HMM parameters in the context of the Baum-Welch algorithm. \n", " The Baum-Welch algorithm is an Expectation-Maximization (EM) algorithm (vulnerable \n", " to local minima).\n", " The Expectation part is computing the di-gamma and the gamma tensors.\n", " The Maximzation part is estimating the new HMM parameters (pi, A, and B) from these\n", " tensors.\n", " \n", " Parameters\n", " ----------\n", " emission_sequence : list\n", " List of ints where each entry is the id of the observable/emission at time step t.\n", " \n", " scalers : list\n", " List of floats where each entry is the scaler (derived during the alpha-pass) of the\n", " tth time step.\n", " \n", " alpha_store : list\n", " List of lists (2D, shape is TxN) where each sub-list is the alpha list at time step t.\n", " \n", " beta_store : list\n", " List of lists (2D, shape is TxN) where each sub-list is the beta list at time step t.\n", " \n", " di_gamma : list\n", " Nested list (3D, shape is TxNxN) where each sub-list is a nested list (2D) of the expected\n", " transition matrix.\n", " It is the reversed list of the beta lists derived during the beta pass (iterating from\n", " time step T to t).\n", " \n", " gamma: list\n", " Nested list (2D, shape is TxN) where each sub-list is the list of probbailities of \n", " being in state i (in N) given the full emission sequence.\n", "\n", " Returns\n", " ------- \n", " pi_new : list\n", " List (1D) of initial new hidden state probability distribution.\n", " A_new : list\n", " Nested list (2D) of new state transition probabilities. The jth entry in the \n", " ith row shows the probability of moving from the ith state to the jth state.\n", " Shape is number of hidden states times the number of hidden states.\n", " B_new : list\n", " Nested list (2D) of new emission probabilities. The jth entry in the \n", " ith row shows the probability of observing the jth obsevable while in hidden state i.\n", " Shape is number of hidden states times the number of observables.\n", " \"\"\"\n", " # Initalize the new HMM parameters.\n", " pi_new = [None for i in range(self.n_hidden_states)]\n", " A_new = [[None for j in range(self.n_hidden_states)] for i in range(self.n_hidden_states)]\n", " B_new = [[None for j in range(self.n_emissions)] for i in range(self.n_hidden_states)]\n", " \n", " # Reestimate pi.\n", " for i in range(self.n_hidden_states):\n", " pi_new[i] = gamma[0][i]\n", " \n", " # Reestimate A.\n", " for i in range(self.n_hidden_states):\n", " \n", " denom = 0\n", " \n", " for t in range(len(emission_sequence) - 1):\n", " \n", " denom = denom + gamma[t][i]\n", " \n", " for j in range(self.n_hidden_states):\n", " \n", " numer = 0\n", " \n", " for t in range(len(emission_sequence) - 1):\n", " \n", " numer = numer + di_gamma[t][i][j]\n", " \n", " A_new[i][j] = numer / (denom + 10e-5)\n", " \n", " # Reestimate B.\n", " for i in range(self.n_hidden_states):\n", " \n", " denom = 0\n", " \n", " for t in range(len(emission_sequence)):\n", " \n", " denom = denom + gamma[t][i]\n", " \n", " for j in range(self.n_emissions):\n", " \n", " numer = 0\n", " \n", " for t in range(len(emission_sequence)):\n", "\n", " if emission_sequence[t] == j:\n", " numer = numer + gamma[t][i]\n", " \n", " B_new[i][j] = numer / (denom + 10e-5)\n", " \n", " return pi_new, A_new, B_new\n", "\n", " \n", " def compute_log_prob(self, emission_sequence, scalers): \n", " \"\"\" Compute log-probability (i.e.: log of P(O|lambda)) of the cost \n", " function of Expectation-Maximization (EM) in the Baum-Welch algorithm.\n", " The log-prob / log(P(O|lambda)) is used to avoid underflow and \n", " to account for alpha list and beta list scaling.\n", " \n", " Parameters\n", " ----------\n", " emission_sequence : list\n", " List of ints where each entry is the id of the observable/emission at time step t.\n", " \n", " scalers : list\n", " List of floats where each entry is the scaler (derived during the alpha-pass) of the\n", " tth time step.\n", "\n", " Returns\n", " ------- \n", " log_prob : float\n", " The log-probability of the EM in the Baum-Welch algorithm.\n", " \"\"\"\n", " # Initialize the log-probability.\n", " log_prob = 0\n", " \n", " # Compute the log-probability.\n", " for t in range(len(emission_sequence)):\n", " log_prob = log_prob + math.log10(scalers[t])\n", " \n", " # Expectation-Maximization (EM), so invert log prob.\n", " log_prob = -log_prob\n", " \n", " return log_prob\n", "\n", " \n", " def baum_welch(self, emission_sequence, max_iters):\n", " \"\"\" The Baum-Welch algorithm: Expectation-Maximization (EM) of the conditional probability of\n", " the full emission sequence given the HMM parameters.\n", " Steps:\n", " (0) Initialize HMM parameters (not uniform!)\n", " (1) Forward-backward algorithm (one alpha-pass and one beta-pass)\n", " (2) Compute expectations with the di-gamma and gamma functions\n", " (3) Maximize expectations via reestimating the HMM parameters\n", " (4) Compute log-probability of EM, log(P(O|lambda))\n", " (5) If log-prob. increased, go to step (1), if not, terminate.\n", " \n", " Parameters\n", " ----------\n", " emission_sequence : list\n", " List of ints where each entry is the id of the observable/emission at time step t.\n", " \n", " max_iters : int\n", " The maximum number of iterations during optimization. Can converge sooner than this.\n", " \"\"\"\n", " # Initialize old log prob\n", " old_log_prob = -10e12\n", " \n", " # Optimize.\n", " for it in range(max_iters):\n", " print(f\"[INFO] Iteration {it}\")\n", " print(f\"\\tAlpha-Pass\")\n", " \n", " # Forward algorithm / alpha-pass.\n", " scalers, alpha_store = self.alpha_pass(emission_sequence=emission_sequence, scale=True)\n", " \n", " print(f\"\\tBeta-Pass\")\n", " \n", " # Backward algorithm / beta-pass.\n", " beta_store = self.beta_pass(scalers=scalers, emission_sequence=emission_sequence, scale=True)\n", " \n", " print(f\"\\tDi-Gamma and Gamma Computation (Expectations)\")\n", " \n", " # Compute di-gamma and gamma, i.e.: expectations.\n", " di_gamma, gamma = \\\n", " self.compute_gammas(alpha_store=alpha_store,\n", " beta_store=beta_store, \n", " emission_sequence=emission_sequence)\n", " \n", " print(f\"\\tReestimating HMM paramseters (Maximizing Expectations)\")\n", " # Reestimate HMM parameters, expectation maximization\n", " self.pi, self.A, self.B = \\\n", " self.reestimate_pi_A_B(emission_sequence=emission_sequence, \n", " scalers=scalers, \n", " alpha_store=alpha_store, \n", " beta_store=beta_store,\n", " di_gamma=di_gamma, \n", " gamma=gamma)\n", " \n", " # Compute log prob.\n", " log_prob = \\\n", " self.compute_log_prob(emission_sequence=emission_sequence, scalers=scalers)\n", " \n", " if old_log_prob < log_prob:\n", " old_log_prob = log_prob\n", " print(f\"\\tlog(P(O|lambda)) = {log_prob}\")\n", " else:\n", " print(f\"\\tlog(P(O|lambda)) = {log_prob}\")\n", " print(\"[INFO] Terminated.\")\n", " break" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "### 2.2 HMM0 - NEXT OBSERVATION DISTRIBUTION" ] }, { "cell_type": "code", "execution_count": 6, "metadata": {}, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "A is [[0.2, 0.5, 0.3, 0.0], [0.1, 0.4, 0.4, 0.1], [0.2, 0.0, 0.4, 0.4], [0.2, 0.3, 0.0, 0.5]]\n", "B is [[1.0, 0.0, 0.0], [0.0, 1.0, 0.0], [0.0, 0.0, 1.0], [0.2, 0.6, 0.2]]\n", "pi is [0.0, 0.0, 0.0, 1.0]\n", "The hidden state prrobability disribtuin at time step 1 (0 indexed) is [0.2, 0.3, 0.0, 0.5]\n", "The emission distribution at time step 1 is [0.30000000000000004, 0.6, 0.1]\n" ] } ], "source": [ "filename_q_2_2_hmm_0 = \"sample_00.in\"\n", "\n", "lines = read_in_file(filename=filename_q_2_2_hmm_0)\n", "\n", "A, B, pi, _ = \\\n", " read_input_HMM1(lines=lines, read_A=True, read_B=True, read_pi=True, read_emission_sequence=False)\n", "\n", "print(f\"A is {A}\")\n", "print(f\"B is {B}\")\n", "print(f\"pi is {pi}\")\n", "\n", "\n", "hmm_0 = HMM.from_known_model(pi=pi, A=A, B=B)\n", "state_dist = hmm_0.next_state_distribution(state_distribution=pi, A=hmm_0.A)\n", "print(f\"The hidden state prrobability disribtuin at time step 1 (0 indexed) is {state_dist}\")\n", "emission_dist = hmm_0.next_emission_distribution(state_distribution=state_dist, B=B)\n", "print(f\"The emission distribution at time step 1 is {emission_dist}\")" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "### 2.3 HMM 1 - P ROBABILITY OF THE OBSERVATION SEQUENCE" ] }, { "cell_type": "code", "execution_count": 7, "metadata": {}, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "A is [[0.0, 0.8, 0.1, 0.1], [0.1, 0.0, 0.8, 0.1], [0.1, 0.1, 0.0, 0.8], [0.8, 0.1, 0.1, 0.0]]\n", "B is [[0.9, 0.1, 0.0, 0.0], [0.0, 0.9, 0.1, 0.0], [0.0, 0.0, 0.9, 0.1], [0.1, 0.0, 0.0, 0.9]]\n", "pi is [1.0, 0.0, 0.0, 0.0]\n", "emission_sequence is [0, 1, 2, 3, 0, 1, 2, 3]\n", "The probability of the emission sequence O [0, 1, 2, 3, 0, 1, 2, 3] is P(O|lambda)=0.09027552\n" ] } ], "source": [ "filename_q_2_3_hmm_1 = \"hmm2_01.in\"\n", "\n", "lines = read_in_file(filename=filename_q_2_3_hmm_1)\n", "\n", "A, B, pi, emission_sequence = \\\n", " read_input_HMM1(lines=lines, read_A=True, read_B=True, read_pi=True, read_emission_sequence=True)\n", "\n", "print(f\"A is {A}\")\n", "print(f\"B is {B}\")\n", "print(f\"pi is {pi}\")\n", "print(f\"emission_sequence is {emission_sequence}\")\n", "\n", "\n", "hmm_1 = HMM.from_known_model(pi=pi, A=A, B=B)\n", "p = hmm_1.probability_of_emission_sequence(emission_sequence=emission_sequence)\n", "\n", "print(f\"The probability of the emission sequence O {emission_sequence} is P(O|lambda)={p:.8f}\")" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "### 2.4 HMM 2 - ESTIMATE SEQUENCE OF STATES" ] }, { "cell_type": "code", "execution_count": 8, "metadata": {}, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "A is [[0.0, 0.8, 0.1, 0.1], [0.1, 0.0, 0.8, 0.1], [0.1, 0.1, 0.0, 0.8], [0.8, 0.1, 0.1, 0.0]]\n", "B is [[0.9, 0.1, 0.0, 0.0], [0.0, 0.9, 0.1, 0.0], [0.0, 0.0, 0.9, 0.1], [0.1, 0.0, 0.0, 0.9]]\n", "pi is [1.0, 0.0, 0.0, 0.0]\n", "emission_sequence is [1, 1, 2, 2]\n", "[[0.0, 0.07200000000000001, 0.0, 0.0]]\n", "[[None, 0, None, None]]\n", "[[0.0, 0.0, 0.05184000000000001, 0.0]]\n", "[[None, None, 1, None]]\n", "[[0.0, 0.0005184000000000001, 0.0, 0.0]]\n", "[[None, 2, None, None]]\n", "Given the HMM parameters and the emission sequence [1, 1, 2, 2],the most likely hidden state sequence is [0, 1, 2, 1]\n" ] } ], "source": [ "filename_q_2_4_hmm_2 = \"hmm3_01.in\"\n", "\n", "lines = read_in_file(filename=filename_q_2_4_hmm_2)\n", "\n", "A, B, pi, emission_sequence = \\\n", " read_input_HMM1(lines=lines, read_A=True, read_B=True, read_pi=True, read_emission_sequence=True)\n", "\n", "print(f\"A is {A}\")\n", "print(f\"B is {B}\")\n", "print(f\"pi is {pi}\")\n", "print(f\"emission_sequence is {emission_sequence}\")\n", "\n", "\n", "hmm_2 = HMM.from_known_model(pi=pi, A=A, B=B)\n", "\n", "sequence_of_states = \\\n", " hmm_2.estimate_sequence_of_states_based_on_emission_sequence(emission_sequence=emission_sequence)\n", "\n", "print(f\"Given the HMM parameters and the emission sequence {emission_sequence},\" \n", " f\"the most likely hidden state sequence is {sequence_of_states}\")" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "### 2.5 HMM 3 - ESTIMATE MODEL PARAMETERS" ] }, { "cell_type": "code", "execution_count": 9, "metadata": {}, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "A is [[0.8, 0.1, 0.1], [0.1, 0.8, 0.1], [0.1, 0.1, 0.8]]\n", "B is [[0.6, 0.4], [0.4, 0.6], [0.4, 0.6]]\n", "pi is [1.0, 0.0, 0.0]\n", "emission_sequence is [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 0, 0, 1, 1, 1, 0, 1, 1, 0, 0, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 0, 0, 1, 1, 1, 1, 1, 0, 1, 1, 1, 0, 1, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 0, 0, 0, 1, 1, 1, 1, 0, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 1, 0, 1, 1, 1, 0, 1, 1, 1, 0, 1, 0, 0, 1, 0, 0, 1, 0, 0, 0, 0, 0, 1, 0, 1, 0, 1, 1, 0, 1, 1, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 1, 1, 0, 1, 0, 1, 1, 1, 1, 0, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 0, 1, 1, 1, 1, 1, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 0, 1, 1, 1, 0, 0, 1, 1, 1, 0, 0, 1, 1, 0, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 1, 1, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 1, 1, 0, 1, 0, 1, 0, 0, 0, 0, 1, 1, 1, 0, 1, 0, 0, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 1, 1, 1, 0, 1, 0, 0, 1, 1, 0, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 0, 1, 0, 1, 1, 1, 1, 1, 0, 1, 1, 0, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 0, 1, 1, 0, 0, 0, 1, 0, 1, 0, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 0, 0, 1, 0, 0, 1, 1, 0, 1, 1, 0, 1, 1, 1, 1, 1, 1, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 0, 0, 0, 1, 1, 1, 1, 1, 0, 0, 0, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 0, 0, 1, 0, 1, 0, 1, 1, 0, 0, 1, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 0, 1, 0, 0, 1, 0, 1, 0, 1, 1, 1, 1, 1, 0, 1, 1, 0, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 0, 0, 1, 1, 1, 1, 1, 0, 0, 1, 0, 0, 0, 0, 1, 0, 1, 0, 1, 0, 1, 1, 0, 0, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 0, 0, 1, 1, 1, 1, 1, 1, 0, 1, 1, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 0, 1, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 0, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 1, 0, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 0, 0, 0, 1, 0, 1, 1, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 0, 0, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 0, 1, 1, 1, 0, 1, 0, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 0, 1, 1, 1, 1, 0, 0, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 1, 1, 0, 0, 1, 1, 1, 1, 1, 0, 0, 1, 0, 0, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 0, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 1, 0, 0, 1, 0, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 1, 0, 0, 0, 0, 0, 0, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 1, 0, 0, 0, 1, 1, 0, 1, 1, 0, 1, 1, 1, 1, 1, 0, 1, 0, 1, 0, 0, 0, 1, 1, 1, 0, 0, 1, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 1, 1, 1, 0, 0, 0, 1, 0, 0, 1, 1, 0, 0, 0, 1, 0, 1, 1, 0, 0, 0, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 0, 0, 1, 0, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 0, 0, 1, 1, 1, 1, 1, 0, 1, 0, 0, 0, 0, 0, 0, 1, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 1, 0, 1, 0, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 0, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 0, 0, 1, 0, 1, 0, 1, 0, 0, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 1, 0, 1, 0, 0, 0, 1, 1, 0, 1, 1, 1, 1, 0, 1, 0, 1]\n", "[INFO] Iteration 0\n", "\tAlpha-Pass\n", "\tBeta-Pass\n", "\tDi-Gamma and Gamma Computation (Expectations)\n", "\tReestimating HMM paramseters (Maximizing Expectations)\n", "\tlog(P(O|lambda)) = -371.35591385578977\n", "[INFO] Iteration 1\n", "\tAlpha-Pass\n", "\tBeta-Pass\n", "\tDi-Gamma and Gamma Computation (Expectations)\n", "\tReestimating HMM paramseters (Maximizing Expectations)\n", "\tlog(P(O|lambda)) = -343.73257393929947\n", "[INFO] Iteration 2\n", "\tAlpha-Pass\n", "\tBeta-Pass\n", "\tDi-Gamma and Gamma Computation (Expectations)\n", "\tReestimating HMM paramseters (Maximizing Expectations)\n", "\tlog(P(O|lambda)) = -336.1762096558385\n", "[INFO] Iteration 3\n", "\tAlpha-Pass\n", "\tBeta-Pass\n", "\tDi-Gamma and Gamma Computation (Expectations)\n", "\tReestimating HMM paramseters (Maximizing Expectations)\n", "\tlog(P(O|lambda)) = -332.2702317957186\n", "[INFO] Iteration 4\n", "\tAlpha-Pass\n", "\tBeta-Pass\n", "\tDi-Gamma and Gamma Computation (Expectations)\n", "\tReestimating HMM paramseters (Maximizing Expectations)\n", "\tlog(P(O|lambda)) = -331.14708887676136\n", "[INFO] Iteration 5\n", "\tAlpha-Pass\n", "\tBeta-Pass\n", "\tDi-Gamma and Gamma Computation (Expectations)\n", "\tReestimating HMM paramseters (Maximizing Expectations)\n", "\tlog(P(O|lambda)) = -330.8973276207492\n", "[INFO] Iteration 6\n", "\tAlpha-Pass\n", "\tBeta-Pass\n", "\tDi-Gamma and Gamma Computation (Expectations)\n", "\tReestimating HMM paramseters (Maximizing Expectations)\n", "\tlog(P(O|lambda)) = -330.8306967756657\n", "[INFO] Iteration 7\n", "\tAlpha-Pass\n", "\tBeta-Pass\n", "\tDi-Gamma and Gamma Computation (Expectations)\n", "\tReestimating HMM paramseters (Maximizing Expectations)\n", "\tlog(P(O|lambda)) = -330.80017499462923\n", "[INFO] Iteration 8\n", "\tAlpha-Pass\n", "\tBeta-Pass\n", "\tDi-Gamma and Gamma Computation (Expectations)\n", "\tReestimating HMM paramseters (Maximizing Expectations)\n", "\tlog(P(O|lambda)) = -330.7795896742946\n", "[INFO] Iteration 9\n", "\tAlpha-Pass\n", "\tBeta-Pass\n", "\tDi-Gamma and Gamma Computation (Expectations)\n", "\tReestimating HMM paramseters (Maximizing Expectations)\n", "\tlog(P(O|lambda)) = -330.7638801539424\n", "[INFO] Iteration 10\n", "\tAlpha-Pass\n", "\tBeta-Pass\n", "\tDi-Gamma and Gamma Computation (Expectations)\n", "\tReestimating HMM paramseters (Maximizing Expectations)\n", "\tlog(P(O|lambda)) = -330.7515355882879\n", "[INFO] Iteration 11\n", "\tAlpha-Pass\n", "\tBeta-Pass\n", "\tDi-Gamma and Gamma Computation (Expectations)\n", "\tReestimating HMM paramseters (Maximizing Expectations)\n", "\tlog(P(O|lambda)) = -330.7417590319658\n", "[INFO] Iteration 12\n", "\tAlpha-Pass\n", "\tBeta-Pass\n", "\tDi-Gamma and Gamma Computation (Expectations)\n", "\tReestimating HMM paramseters (Maximizing Expectations)\n", "\tlog(P(O|lambda)) = -330.7339904904652\n", "[INFO] Iteration 13\n", "\tAlpha-Pass\n", "\tBeta-Pass\n", "\tDi-Gamma and Gamma Computation (Expectations)\n", "\tReestimating HMM paramseters (Maximizing Expectations)\n", "\tlog(P(O|lambda)) = -330.7278035146906\n", "[INFO] Iteration 14\n", "\tAlpha-Pass\n", "\tBeta-Pass\n", "\tDi-Gamma and Gamma Computation (Expectations)\n", "\tReestimating HMM paramseters (Maximizing Expectations)\n", "\tlog(P(O|lambda)) = -330.7228666841938\n", "[INFO] Iteration 15\n", "\tAlpha-Pass\n", "\tBeta-Pass\n", "\tDi-Gamma and Gamma Computation (Expectations)\n", "\tReestimating HMM paramseters (Maximizing Expectations)\n", "\tlog(P(O|lambda)) = -330.7189206457872\n", "[INFO] Iteration 16\n", "\tAlpha-Pass\n", "\tBeta-Pass\n", "\tDi-Gamma and Gamma Computation (Expectations)\n", "\tReestimating HMM paramseters (Maximizing Expectations)\n", "\tlog(P(O|lambda)) = -330.7157616502654\n", "[INFO] Iteration 17\n", "\tAlpha-Pass\n", "\tBeta-Pass\n", "\tDi-Gamma and Gamma Computation (Expectations)\n", "\tReestimating HMM paramseters (Maximizing Expectations)\n", "\tlog(P(O|lambda)) = -330.71322914008044\n", "[INFO] Iteration 18\n", "\tAlpha-Pass\n", "\tBeta-Pass\n", "\tDi-Gamma and Gamma Computation (Expectations)\n", "\tReestimating HMM paramseters (Maximizing Expectations)\n", "\tlog(P(O|lambda)) = -330.7111962510767\n", "[INFO] Iteration 19\n", "\tAlpha-Pass\n", "\tBeta-Pass\n", "\tDi-Gamma and Gamma Computation (Expectations)\n", "\tReestimating HMM paramseters (Maximizing Expectations)\n", "\tlog(P(O|lambda)) = -330.7095624952887\n", "[INFO] Iteration 20\n", "\tAlpha-Pass\n", "\tBeta-Pass\n", "\tDi-Gamma and Gamma Computation (Expectations)\n", "\tReestimating HMM paramseters (Maximizing Expectations)\n", "\tlog(P(O|lambda)) = -330.70824809775564\n", "[INFO] Iteration 21\n", "\tAlpha-Pass\n", "\tBeta-Pass\n", "\tDi-Gamma and Gamma Computation (Expectations)\n", "\tReestimating HMM paramseters (Maximizing Expectations)\n", "\tlog(P(O|lambda)) = -330.70718959614175\n", "[INFO] Iteration 22\n", "\tAlpha-Pass\n", "\tBeta-Pass\n", "\tDi-Gamma and Gamma Computation (Expectations)\n", "\tReestimating HMM paramseters (Maximizing Expectations)\n", "\tlog(P(O|lambda)) = -330.70633640925973\n", "[INFO] Iteration 23\n", "\tAlpha-Pass\n", "\tBeta-Pass\n", "\tDi-Gamma and Gamma Computation (Expectations)\n", "\tReestimating HMM paramseters (Maximizing Expectations)\n", "\tlog(P(O|lambda)) = -330.70564815231256\n", "[INFO] Iteration 24\n", "\tAlpha-Pass\n", "\tBeta-Pass\n", "\tDi-Gamma and Gamma Computation (Expectations)\n", "\tReestimating HMM paramseters (Maximizing Expectations)\n", "\tlog(P(O|lambda)) = -330.70509252991957\n", "[INFO] Iteration 25\n", "\tAlpha-Pass\n", "\tBeta-Pass\n", "\tDi-Gamma and Gamma Computation (Expectations)\n", "\tReestimating HMM paramseters (Maximizing Expectations)\n", "\tlog(P(O|lambda)) = -330.7046436778737\n", "[INFO] Iteration 26\n", "\tAlpha-Pass\n", "\tBeta-Pass\n", "\tDi-Gamma and Gamma Computation (Expectations)\n", "\tReestimating HMM paramseters (Maximizing Expectations)\n", "\tlog(P(O|lambda)) = -330.70428085462294\n", "[INFO] Iteration 27\n", "\tAlpha-Pass\n" ] }, { "name": "stdout", "output_type": "stream", "text": [ "\tBeta-Pass\n", "\tDi-Gamma and Gamma Computation (Expectations)\n", "\tReestimating HMM paramseters (Maximizing Expectations)\n", "\tlog(P(O|lambda)) = -330.7039874061727\n", "[INFO] Iteration 28\n", "\tAlpha-Pass\n", "\tBeta-Pass\n", "\tDi-Gamma and Gamma Computation (Expectations)\n", "\tReestimating HMM paramseters (Maximizing Expectations)\n", "\tlog(P(O|lambda)) = -330.7037499454571\n", "[INFO] Iteration 29\n", "\tAlpha-Pass\n", "\tBeta-Pass\n", "\tDi-Gamma and Gamma Computation (Expectations)\n", "\tReestimating HMM paramseters (Maximizing Expectations)\n", "\tlog(P(O|lambda)) = -330.703557700356\n", "pi\n", "1.0000000000000098 0.0 0.0\n", "A\n", "0.846223 0.076888 0.076888\n", "0.083598 0.814579 0.101822\n", "0.083598 0.101822 0.814579\n", "B\n", "0.6827 0.317299\n", "0.126899 0.873101\n", "0.126899 0.873101\n" ] } ], "source": [ "filenames_hmm3 = [\"hmm4_01.in\", \"hmm4_02.in\", \"hmm4_03.in\"]\n", "\n", "filename_q_2_5_hmm_3 = filenames_hmm3[2]\n", "\n", "lines = read_in_file(filename=filename_q_2_5_hmm_3)\n", "\n", "A_init, B_init, pi_init, emission_sequence = \\\n", " read_input_HMM1(lines=lines, read_A=True, read_B=True, read_pi=True, read_emission_sequence=True)\n", "\n", "print(f\"A is {A_init}\")\n", "print(f\"B is {B_init}\")\n", "print(f\"pi is {pi_init}\")\n", "print(f\"emission_sequence is {emission_sequence}\")\n", "\n", "\n", "hmm_3 = HMM.from_unknown_model_given_init(pi_init=pi_init, A_init=A_init, B_init=B_init)\n", "\n", "max_iters = 30\n", "\n", "hmm_3.baum_welch(emission_sequence=emission_sequence, max_iters=max_iters)\n", "\n", "pi_fit, A_fit, B_fit = hmm_3.pi, hmm_3.A, hmm_3.B\n", "\n", "print(\"pi\")\n", "print(' '.join(map(str, pi_fit)))\n", "print(\"A\")\n", "pretty_print_matrix(A=A_fit, round_to=6)\n", "print(\"B\")\n", "pretty_print_matrix(A=B_fit, round_to=6)" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "### OWN TRY: ESTIMATE MODEL PARAMETERS WITH MY INITIALIZED PARAMETERS" ] }, { "cell_type": "code", "execution_count": 10, "metadata": {}, "outputs": [], "source": [ "hmm_my_init = HMM.from_unknown_model_gauss(N=3, M=2, init_uniform=False)" ] }, { "cell_type": "code", "execution_count": 11, "metadata": {}, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "pi\n", "0.33784790236861895 0.33173161152253045 0.3304204861088507\n", "A\n", "0.3341 0.3301 0.3359\n", "0.334 0.333 0.333\n", "0.3348 0.3308 0.3344\n", "B\n", "0.5024 0.4976\n", "0.4996 0.5004\n", "0.5044 0.4956\n" ] } ], "source": [ "print(\"pi\")\n", "print(' '.join(map(str, hmm_my_init.pi)))\n", "print(\"A\")\n", "pretty_print_matrix(A=hmm_my_init.A, round_to = 4)\n", "print(\"B\")\n", "pretty_print_matrix(A=hmm_my_init.B, round_to = 4)" ] }, { "cell_type": "code", "execution_count": 12, "metadata": {}, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "emission_sequence is [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 0, 0, 1, 1, 1, 0, 1, 1, 0, 0, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 0, 0, 1, 1, 1, 1, 1, 0, 1, 1, 1, 0, 1, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 0, 0, 0, 1, 1, 1, 1, 0, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 1, 0, 1, 1, 1, 0, 1, 1, 1, 0, 1, 0, 0, 1, 0, 0, 1, 0, 0, 0, 0, 0, 1, 0, 1, 0, 1, 1, 0, 1, 1, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 1, 1, 0, 1, 0, 1, 1, 1, 1, 0, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 0, 1, 1, 1, 1, 1, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 0, 1, 1, 1, 0, 0, 1, 1, 1, 0, 0, 1, 1, 0, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 1, 1, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 1, 1, 0, 1, 0, 1, 0, 0, 0, 0, 1, 1, 1, 0, 1, 0, 0, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 1, 1, 1, 0, 1, 0, 0, 1, 1, 0, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 0, 1, 0, 1, 1, 1, 1, 1, 0, 1, 1, 0, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 0, 1, 1, 0, 0, 0, 1, 0, 1, 0, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 0, 0, 1, 0, 0, 1, 1, 0, 1, 1, 0, 1, 1, 1, 1, 1, 1, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 0, 0, 0, 1, 1, 1, 1, 1, 0, 0, 0, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 0, 0, 1, 0, 1, 0, 1, 1, 0, 0, 1, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 0, 1, 0, 0, 1, 0, 1, 0, 1, 1, 1, 1, 1, 0, 1, 1, 0, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 0, 0, 1, 1, 1, 1, 1, 0, 0, 1, 0, 0, 0, 0, 1, 0, 1, 0, 1, 0, 1, 1, 0, 0, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 0, 0, 1, 1, 1, 1, 1, 1, 0, 1, 1, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 0, 1, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 0, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 1, 0, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 0, 0, 0, 1, 0, 1, 1, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 0, 0, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 0, 1, 1, 1, 0, 1, 0, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 0, 1, 1, 1, 1, 0, 0, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 1, 1, 0, 0, 1, 1, 1, 1, 1, 0, 0, 1, 0, 0, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 0, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 1, 0, 0, 1, 0, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 1, 0, 0, 0, 0, 0, 0, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 1, 0, 0, 0, 1, 1, 0, 1, 1, 0, 1, 1, 1, 1, 1, 0, 1, 0, 1, 0, 0, 0, 1, 1, 1, 0, 0, 1, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 1, 1, 1, 0, 0, 0, 1, 0, 0, 1, 1, 0, 0, 0, 1, 0, 1, 1, 0, 0, 0, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 0, 0, 1, 0, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 0, 0, 1, 1, 1, 1, 1, 0, 1, 0, 0, 0, 0, 0, 0, 1, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 1, 0, 1, 0, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 0, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 0, 0, 1, 0, 1, 0, 1, 0, 0, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 1, 0, 1, 0, 0, 0, 1, 1, 0, 1, 1, 1, 1, 0, 1, 0, 1]\n", "[INFO] Iteration 0\n", "\tAlpha-Pass\n", "\tBeta-Pass\n", "\tDi-Gamma and Gamma Computation (Expectations)\n", "\tReestimating HMM paramseters (Maximizing Expectations)\n", "\tlog(P(O|lambda)) = -392.1820320367511\n", "[INFO] Iteration 1\n", "\tAlpha-Pass\n", "\tBeta-Pass\n", "\tDi-Gamma and Gamma Computation (Expectations)\n", "\tReestimating HMM paramseters (Maximizing Expectations)\n", "\tlog(P(O|lambda)) = -355.5376229904262\n", "[INFO] Iteration 2\n", "\tAlpha-Pass\n", "\tBeta-Pass\n", "\tDi-Gamma and Gamma Computation (Expectations)\n", "\tReestimating HMM paramseters (Maximizing Expectations)\n", "\tlog(P(O|lambda)) = -355.53762011361994\n", "[INFO] Iteration 3\n", "\tAlpha-Pass\n", "\tBeta-Pass\n", "\tDi-Gamma and Gamma Computation (Expectations)\n", "\tReestimating HMM paramseters (Maximizing Expectations)\n", "\tlog(P(O|lambda)) = -355.5376172094892\n", "[INFO] Iteration 4\n", "\tAlpha-Pass\n", "\tBeta-Pass\n", "\tDi-Gamma and Gamma Computation (Expectations)\n", "\tReestimating HMM paramseters (Maximizing Expectations)\n", "\tlog(P(O|lambda)) = -355.53761427371825\n", "[INFO] Iteration 5\n", "\tAlpha-Pass\n", "\tBeta-Pass\n", "\tDi-Gamma and Gamma Computation (Expectations)\n", "\tReestimating HMM paramseters (Maximizing Expectations)\n", "\tlog(P(O|lambda)) = -355.53761130194476\n", "[INFO] Iteration 6\n", "\tAlpha-Pass\n", "\tBeta-Pass\n", "\tDi-Gamma and Gamma Computation (Expectations)\n", "\tReestimating HMM paramseters (Maximizing Expectations)\n", "\tlog(P(O|lambda)) = -355.537608289694\n", "[INFO] Iteration 7\n", "\tAlpha-Pass\n", "\tBeta-Pass\n", "\tDi-Gamma and Gamma Computation (Expectations)\n", "\tReestimating HMM paramseters (Maximizing Expectations)\n", "\tlog(P(O|lambda)) = -355.537605232476\n", "[INFO] Iteration 8\n", "\tAlpha-Pass\n", "\tBeta-Pass\n", "\tDi-Gamma and Gamma Computation (Expectations)\n", "\tReestimating HMM paramseters (Maximizing Expectations)\n", "\tlog(P(O|lambda)) = -355.5376021256848\n", "[INFO] Iteration 9\n", "\tAlpha-Pass\n", "\tBeta-Pass\n", "\tDi-Gamma and Gamma Computation (Expectations)\n", "\tReestimating HMM paramseters (Maximizing Expectations)\n", "\tlog(P(O|lambda)) = -355.5375989646574\n", "[INFO] Iteration 10\n", "\tAlpha-Pass\n", "\tBeta-Pass\n", "\tDi-Gamma and Gamma Computation (Expectations)\n", "\tReestimating HMM paramseters (Maximizing Expectations)\n", "\tlog(P(O|lambda)) = -355.53759574461276\n", "[INFO] Iteration 11\n", "\tAlpha-Pass\n", "\tBeta-Pass\n", "\tDi-Gamma and Gamma Computation (Expectations)\n", "\tReestimating HMM paramseters (Maximizing Expectations)\n", "\tlog(P(O|lambda)) = -355.5375924606906\n", "[INFO] Iteration 12\n", "\tAlpha-Pass\n", "\tBeta-Pass\n", "\tDi-Gamma and Gamma Computation (Expectations)\n", "\tReestimating HMM paramseters (Maximizing Expectations)\n", "\tlog(P(O|lambda)) = -355.537589107895\n", "[INFO] Iteration 13\n", "\tAlpha-Pass\n", "\tBeta-Pass\n", "\tDi-Gamma and Gamma Computation (Expectations)\n", "\tReestimating HMM paramseters (Maximizing Expectations)\n", "\tlog(P(O|lambda)) = -355.5375856811584\n", "[INFO] Iteration 14\n", "\tAlpha-Pass\n", "\tBeta-Pass\n", "\tDi-Gamma and Gamma Computation (Expectations)\n", "\tReestimating HMM paramseters (Maximizing Expectations)\n", "\tlog(P(O|lambda)) = -355.5375821752511\n", "[INFO] Iteration 15\n", "\tAlpha-Pass\n", "\tBeta-Pass\n", "\tDi-Gamma and Gamma Computation (Expectations)\n", "\tReestimating HMM paramseters (Maximizing Expectations)\n", "\tlog(P(O|lambda)) = -355.53757858483624\n", "[INFO] Iteration 16\n", "\tAlpha-Pass\n", "\tBeta-Pass\n", "\tDi-Gamma and Gamma Computation (Expectations)\n", "\tReestimating HMM paramseters (Maximizing Expectations)\n", "\tlog(P(O|lambda)) = -355.53757490442445\n", "[INFO] Iteration 17\n", "\tAlpha-Pass\n", "\tBeta-Pass\n", "\tDi-Gamma and Gamma Computation (Expectations)\n", "\tReestimating HMM paramseters (Maximizing Expectations)\n", "\tlog(P(O|lambda)) = -355.537571128386\n", "[INFO] Iteration 18\n", "\tAlpha-Pass\n", "\tBeta-Pass\n", "\tDi-Gamma and Gamma Computation (Expectations)\n", "\tReestimating HMM paramseters (Maximizing Expectations)\n", "\tlog(P(O|lambda)) = -355.53756725093575\n", "[INFO] Iteration 19\n", "\tAlpha-Pass\n", "\tBeta-Pass\n", "\tDi-Gamma and Gamma Computation (Expectations)\n", "\tReestimating HMM paramseters (Maximizing Expectations)\n", "\tlog(P(O|lambda)) = -355.5375632661225\n", "[INFO] Iteration 20\n", "\tAlpha-Pass\n", "\tBeta-Pass\n", "\tDi-Gamma and Gamma Computation (Expectations)\n", "\tReestimating HMM paramseters (Maximizing Expectations)\n", "\tlog(P(O|lambda)) = -355.53755916781284\n", "[INFO] Iteration 21\n", "\tAlpha-Pass\n", "\tBeta-Pass\n", "\tDi-Gamma and Gamma Computation (Expectations)\n", "\tReestimating HMM paramseters (Maximizing Expectations)\n", "\tlog(P(O|lambda)) = -355.5375549497087\n", "[INFO] Iteration 22\n", "\tAlpha-Pass\n", "\tBeta-Pass\n", "\tDi-Gamma and Gamma Computation (Expectations)\n", "\tReestimating HMM paramseters (Maximizing Expectations)\n", "\tlog(P(O|lambda)) = -355.5375506052862\n", "[INFO] Iteration 23\n", "\tAlpha-Pass\n", "\tBeta-Pass\n", "\tDi-Gamma and Gamma Computation (Expectations)\n" ] }, { "name": "stdout", "output_type": "stream", "text": [ "\tReestimating HMM paramseters (Maximizing Expectations)\n", "\tlog(P(O|lambda)) = -355.5375461278573\n", "[INFO] Iteration 24\n", "\tAlpha-Pass\n", "\tBeta-Pass\n", "\tDi-Gamma and Gamma Computation (Expectations)\n", "\tReestimating HMM paramseters (Maximizing Expectations)\n", "\tlog(P(O|lambda)) = -355.53754151048526\n", "[INFO] Iteration 25\n", "\tAlpha-Pass\n", "\tBeta-Pass\n", "\tDi-Gamma and Gamma Computation (Expectations)\n", "\tReestimating HMM paramseters (Maximizing Expectations)\n", "\tlog(P(O|lambda)) = -355.53753674602194\n", "[INFO] Iteration 26\n", "\tAlpha-Pass\n", "\tBeta-Pass\n", "\tDi-Gamma and Gamma Computation (Expectations)\n", "\tReestimating HMM paramseters (Maximizing Expectations)\n", "\tlog(P(O|lambda)) = -355.5375318270792\n", "[INFO] Iteration 27\n", "\tAlpha-Pass\n", "\tBeta-Pass\n", "\tDi-Gamma and Gamma Computation (Expectations)\n", "\tReestimating HMM paramseters (Maximizing Expectations)\n", "\tlog(P(O|lambda)) = -355.5375267460244\n", "[INFO] Iteration 28\n", "\tAlpha-Pass\n", "\tBeta-Pass\n", "\tDi-Gamma and Gamma Computation (Expectations)\n", "\tReestimating HMM paramseters (Maximizing Expectations)\n", "\tlog(P(O|lambda)) = -355.5375214949641\n", "[INFO] Iteration 29\n", "\tAlpha-Pass\n", "\tBeta-Pass\n", "\tDi-Gamma and Gamma Computation (Expectations)\n", "\tReestimating HMM paramseters (Maximizing Expectations)\n", "\tlog(P(O|lambda)) = -355.5375160657133\n", "[INFO] Iteration 30\n", "\tAlpha-Pass\n", "\tBeta-Pass\n", "\tDi-Gamma and Gamma Computation (Expectations)\n", "\tReestimating HMM paramseters (Maximizing Expectations)\n", "\tlog(P(O|lambda)) = -355.5375104498385\n", "[INFO] Iteration 31\n", "\tAlpha-Pass\n", "\tBeta-Pass\n", "\tDi-Gamma and Gamma Computation (Expectations)\n", "\tReestimating HMM paramseters (Maximizing Expectations)\n", "\tlog(P(O|lambda)) = -355.5375046385742\n", "[INFO] Iteration 32\n", "\tAlpha-Pass\n", "\tBeta-Pass\n", "\tDi-Gamma and Gamma Computation (Expectations)\n", "\tReestimating HMM paramseters (Maximizing Expectations)\n", "\tlog(P(O|lambda)) = -355.53749862284354\n", "[INFO] Iteration 33\n", "\tAlpha-Pass\n", "\tBeta-Pass\n", "\tDi-Gamma and Gamma Computation (Expectations)\n", "\tReestimating HMM paramseters (Maximizing Expectations)\n", "\tlog(P(O|lambda)) = -355.537492393263\n", "[INFO] Iteration 34\n", "\tAlpha-Pass\n", "\tBeta-Pass\n", "\tDi-Gamma and Gamma Computation (Expectations)\n", "\tReestimating HMM paramseters (Maximizing Expectations)\n", "\tlog(P(O|lambda)) = -355.53748594006987\n", "[INFO] Iteration 35\n", "\tAlpha-Pass\n", "\tBeta-Pass\n", "\tDi-Gamma and Gamma Computation (Expectations)\n", "\tReestimating HMM paramseters (Maximizing Expectations)\n", "\tlog(P(O|lambda)) = -355.5374792531792\n", "[INFO] Iteration 36\n", "\tAlpha-Pass\n", "\tBeta-Pass\n", "\tDi-Gamma and Gamma Computation (Expectations)\n", "\tReestimating HMM paramseters (Maximizing Expectations)\n", "\tlog(P(O|lambda)) = -355.5374723221062\n", "[INFO] Iteration 37\n", "\tAlpha-Pass\n", "\tBeta-Pass\n", "\tDi-Gamma and Gamma Computation (Expectations)\n", "\tReestimating HMM paramseters (Maximizing Expectations)\n", "\tlog(P(O|lambda)) = -355.5374651359927\n", "[INFO] Iteration 38\n", "\tAlpha-Pass\n", "\tBeta-Pass\n", "\tDi-Gamma and Gamma Computation (Expectations)\n", "\tReestimating HMM paramseters (Maximizing Expectations)\n", "\tlog(P(O|lambda)) = -355.5374576835451\n", "[INFO] Iteration 39\n", "\tAlpha-Pass\n", "\tBeta-Pass\n", "\tDi-Gamma and Gamma Computation (Expectations)\n", "\tReestimating HMM paramseters (Maximizing Expectations)\n", "\tlog(P(O|lambda)) = -355.5374499530688\n", "[INFO] Iteration 40\n", "\tAlpha-Pass\n", "\tBeta-Pass\n", "\tDi-Gamma and Gamma Computation (Expectations)\n", "\tReestimating HMM paramseters (Maximizing Expectations)\n", "\tlog(P(O|lambda)) = -355.53744193242244\n", "[INFO] Iteration 41\n", "\tAlpha-Pass\n", "\tBeta-Pass\n", "\tDi-Gamma and Gamma Computation (Expectations)\n", "\tReestimating HMM paramseters (Maximizing Expectations)\n", "\tlog(P(O|lambda)) = -355.5374336089647\n", "[INFO] Iteration 42\n", "\tAlpha-Pass\n", "\tBeta-Pass\n", "\tDi-Gamma and Gamma Computation (Expectations)\n", "\tReestimating HMM paramseters (Maximizing Expectations)\n", "\tlog(P(O|lambda)) = -355.537424969608\n", "[INFO] Iteration 43\n", "\tAlpha-Pass\n", "\tBeta-Pass\n", "\tDi-Gamma and Gamma Computation (Expectations)\n", "\tReestimating HMM paramseters (Maximizing Expectations)\n", "\tlog(P(O|lambda)) = -355.5374160007364\n", "[INFO] Iteration 44\n", "\tAlpha-Pass\n", "\tBeta-Pass\n", "\tDi-Gamma and Gamma Computation (Expectations)\n", "\tReestimating HMM paramseters (Maximizing Expectations)\n", "\tlog(P(O|lambda)) = -355.5374066881971\n", "[INFO] Iteration 45\n", "\tAlpha-Pass\n", "\tBeta-Pass\n", "\tDi-Gamma and Gamma Computation (Expectations)\n", "\tReestimating HMM paramseters (Maximizing Expectations)\n", "\tlog(P(O|lambda)) = -355.53739701731445\n", "[INFO] Iteration 46\n", "\tAlpha-Pass\n", "\tBeta-Pass\n", "\tDi-Gamma and Gamma Computation (Expectations)\n", "\tReestimating HMM paramseters (Maximizing Expectations)\n", "\tlog(P(O|lambda)) = -355.53738697281227\n", "[INFO] Iteration 47\n", "\tAlpha-Pass\n", "\tBeta-Pass\n", "\tDi-Gamma and Gamma Computation (Expectations)\n", "\tReestimating HMM paramseters (Maximizing Expectations)\n", "\tlog(P(O|lambda)) = -355.5373765388102\n", "[INFO] Iteration 48\n", "\tAlpha-Pass\n", "\tBeta-Pass\n", "\tDi-Gamma and Gamma Computation (Expectations)\n", "\tReestimating HMM paramseters (Maximizing Expectations)\n", "\tlog(P(O|lambda)) = -355.53736569882903\n", "[INFO] Iteration 49\n", "\tAlpha-Pass\n", "\tBeta-Pass\n", "\tDi-Gamma and Gamma Computation (Expectations)\n", "\tReestimating HMM paramseters (Maximizing Expectations)\n", "\tlog(P(O|lambda)) = -355.5373544357014\n", "[INFO] Iteration 50\n", "\tAlpha-Pass\n", "\tBeta-Pass\n", "\tDi-Gamma and Gamma Computation (Expectations)\n", "\tReestimating HMM paramseters (Maximizing Expectations)\n", "\tlog(P(O|lambda)) = -355.5373427316116\n", "[INFO] Iteration 51\n", "\tAlpha-Pass\n", "\tBeta-Pass\n", "\tDi-Gamma and Gamma Computation (Expectations)\n", "\tReestimating HMM paramseters (Maximizing Expectations)\n", "\tlog(P(O|lambda)) = -355.5373305680107\n", "[INFO] Iteration 52\n", "\tAlpha-Pass\n", "\tBeta-Pass\n", "\tDi-Gamma and Gamma Computation (Expectations)\n", "\tReestimating HMM paramseters (Maximizing Expectations)\n", "\tlog(P(O|lambda)) = -355.537317925616\n", "[INFO] Iteration 53\n", "\tAlpha-Pass\n", "\tBeta-Pass\n", "\tDi-Gamma and Gamma Computation (Expectations)\n", "\tReestimating HMM paramseters (Maximizing Expectations)\n", "\tlog(P(O|lambda)) = -355.53730478439144\n", "[INFO] Iteration 54\n", "\tAlpha-Pass\n", "\tBeta-Pass\n", "\tDi-Gamma and Gamma Computation (Expectations)\n", "\tReestimating HMM paramseters (Maximizing Expectations)\n", "\tlog(P(O|lambda)) = -355.5372911234759\n", "[INFO] Iteration 55\n", "\tAlpha-Pass\n", "\tBeta-Pass\n", "\tDi-Gamma and Gamma Computation (Expectations)\n", "\tReestimating HMM paramseters (Maximizing Expectations)\n", "\tlog(P(O|lambda)) = -355.5372769211874\n", "[INFO] Iteration 56\n", "\tAlpha-Pass\n", "\tBeta-Pass\n", "\tDi-Gamma and Gamma Computation (Expectations)\n", "\tReestimating HMM paramseters (Maximizing Expectations)\n", "\tlog(P(O|lambda)) = -355.53726215495465\n", "[INFO] Iteration 57\n", "\tAlpha-Pass\n", "\tBeta-Pass\n", "\tDi-Gamma and Gamma Computation (Expectations)\n", "\tReestimating HMM paramseters (Maximizing Expectations)\n", "\tlog(P(O|lambda)) = -355.537246801322\n", "[INFO] Iteration 58\n", "\tAlpha-Pass\n", "\tBeta-Pass\n", "\tDi-Gamma and Gamma Computation (Expectations)\n", "\tReestimating HMM paramseters (Maximizing Expectations)\n", "\tlog(P(O|lambda)) = -355.53723083586664\n", "[INFO] Iteration 59\n", "\tAlpha-Pass\n", "\tBeta-Pass\n", "\tDi-Gamma and Gamma Computation (Expectations)\n", "\tReestimating HMM paramseters (Maximizing Expectations)\n", "\tlog(P(O|lambda)) = -355.5372142331921\n", "[INFO] Iteration 60\n", "\tAlpha-Pass\n", "\tBeta-Pass\n", "\tDi-Gamma and Gamma Computation (Expectations)\n", "\tReestimating HMM paramseters (Maximizing Expectations)\n", "\tlog(P(O|lambda)) = -355.53719696688484\n", "[INFO] Iteration 61\n", "\tAlpha-Pass\n", "\tBeta-Pass\n", "\tDi-Gamma and Gamma Computation (Expectations)\n", "\tReestimating HMM paramseters (Maximizing Expectations)\n", "\tlog(P(O|lambda)) = -355.5371790094472\n", "[INFO] Iteration 62\n", "\tAlpha-Pass\n", "\tBeta-Pass\n", "\tDi-Gamma and Gamma Computation (Expectations)\n", "\tReestimating HMM paramseters (Maximizing Expectations)\n", "\tlog(P(O|lambda)) = -355.53716033227664\n", "[INFO] Iteration 63\n", "\tAlpha-Pass\n", "\tBeta-Pass\n", "\tDi-Gamma and Gamma Computation (Expectations)\n", "\tReestimating HMM paramseters (Maximizing Expectations)\n", "\tlog(P(O|lambda)) = -355.5371409056075\n", "[INFO] Iteration 64\n", "\tAlpha-Pass\n", "\tBeta-Pass\n", "\tDi-Gamma and Gamma Computation (Expectations)\n", "\tReestimating HMM paramseters (Maximizing Expectations)\n", "\tlog(P(O|lambda)) = -355.5371206984877\n", "[INFO] Iteration 65\n", "\tAlpha-Pass\n", "\tBeta-Pass\n", "\tDi-Gamma and Gamma Computation (Expectations)\n", "\tReestimating HMM paramseters (Maximizing Expectations)\n", "\tlog(P(O|lambda)) = -355.5370996786939\n", "[INFO] Iteration 66\n", "\tAlpha-Pass\n", "\tBeta-Pass\n", "\tDi-Gamma and Gamma Computation (Expectations)\n", "\tReestimating HMM paramseters (Maximizing Expectations)\n", "\tlog(P(O|lambda)) = -355.53707781269856\n", "[INFO] Iteration 67\n", "\tAlpha-Pass\n", "\tBeta-Pass\n", "\tDi-Gamma and Gamma Computation (Expectations)\n", "\tReestimating HMM paramseters (Maximizing Expectations)\n", "\tlog(P(O|lambda)) = -355.5370550656272\n", "[INFO] Iteration 68\n", "\tAlpha-Pass\n", "\tBeta-Pass\n", "\tDi-Gamma and Gamma Computation (Expectations)\n", "\tReestimating HMM paramseters (Maximizing Expectations)\n", "\tlog(P(O|lambda)) = -355.5370314011904\n", "[INFO] Iteration 69\n", "\tAlpha-Pass\n", "\tBeta-Pass\n", "\tDi-Gamma and Gamma Computation (Expectations)\n", "\tReestimating HMM paramseters (Maximizing Expectations)\n", "\tlog(P(O|lambda)) = -355.5370067815994\n", "[INFO] Iteration 70\n", "\tAlpha-Pass\n", "\tBeta-Pass\n", "\tDi-Gamma and Gamma Computation (Expectations)\n", "\tReestimating HMM paramseters (Maximizing Expectations)\n", "\tlog(P(O|lambda)) = -355.5369811675804\n", "[INFO] Iteration 71\n", "\tAlpha-Pass\n" ] }, { "name": "stdout", "output_type": "stream", "text": [ "\tBeta-Pass\n", "\tDi-Gamma and Gamma Computation (Expectations)\n", "\tReestimating HMM paramseters (Maximizing Expectations)\n", "\tlog(P(O|lambda)) = -355.53695451824905\n", "[INFO] Iteration 72\n", "\tAlpha-Pass\n", "\tBeta-Pass\n", "\tDi-Gamma and Gamma Computation (Expectations)\n", "\tReestimating HMM paramseters (Maximizing Expectations)\n", "\tlog(P(O|lambda)) = -355.5369267910585\n", "[INFO] Iteration 73\n", "\tAlpha-Pass\n", "\tBeta-Pass\n", "\tDi-Gamma and Gamma Computation (Expectations)\n", "\tReestimating HMM paramseters (Maximizing Expectations)\n", "\tlog(P(O|lambda)) = -355.5368979417502\n", "[INFO] Iteration 74\n", "\tAlpha-Pass\n", "\tBeta-Pass\n", "\tDi-Gamma and Gamma Computation (Expectations)\n", "\tReestimating HMM paramseters (Maximizing Expectations)\n", "\tlog(P(O|lambda)) = -355.53686792427504\n", "[INFO] Iteration 75\n", "\tAlpha-Pass\n", "\tBeta-Pass\n", "\tDi-Gamma and Gamma Computation (Expectations)\n", "\tReestimating HMM paramseters (Maximizing Expectations)\n", "\tlog(P(O|lambda)) = -355.5368366907255\n", "[INFO] Iteration 76\n", "\tAlpha-Pass\n", "\tBeta-Pass\n", "\tDi-Gamma and Gamma Computation (Expectations)\n", "\tReestimating HMM paramseters (Maximizing Expectations)\n", "\tlog(P(O|lambda)) = -355.5368041912623\n", "[INFO] Iteration 77\n", "\tAlpha-Pass\n", "\tBeta-Pass\n", "\tDi-Gamma and Gamma Computation (Expectations)\n", "\tReestimating HMM paramseters (Maximizing Expectations)\n", "\tlog(P(O|lambda)) = -355.53677037404276\n", "[INFO] Iteration 78\n", "\tAlpha-Pass\n", "\tBeta-Pass\n", "\tDi-Gamma and Gamma Computation (Expectations)\n", "\tReestimating HMM paramseters (Maximizing Expectations)\n", "\tlog(P(O|lambda)) = -355.5367351851176\n", "[INFO] Iteration 79\n", "\tAlpha-Pass\n", "\tBeta-Pass\n", "\tDi-Gamma and Gamma Computation (Expectations)\n", "\tReestimating HMM paramseters (Maximizing Expectations)\n", "\tlog(P(O|lambda)) = -355.53669856840446\n", "[INFO] Iteration 80\n", "\tAlpha-Pass\n", "\tBeta-Pass\n", "\tDi-Gamma and Gamma Computation (Expectations)\n", "\tReestimating HMM paramseters (Maximizing Expectations)\n", "\tlog(P(O|lambda)) = -355.536660465532\n", "[INFO] Iteration 81\n", "\tAlpha-Pass\n", "\tBeta-Pass\n", "\tDi-Gamma and Gamma Computation (Expectations)\n", "\tReestimating HMM paramseters (Maximizing Expectations)\n", "\tlog(P(O|lambda)) = -355.53662081581575\n", "[INFO] Iteration 82\n", "\tAlpha-Pass\n", "\tBeta-Pass\n", "\tDi-Gamma and Gamma Computation (Expectations)\n", "\tReestimating HMM paramseters (Maximizing Expectations)\n", "\tlog(P(O|lambda)) = -355.5365795561457\n", "[INFO] Iteration 83\n", "\tAlpha-Pass\n", "\tBeta-Pass\n", "\tDi-Gamma and Gamma Computation (Expectations)\n", "\tReestimating HMM paramseters (Maximizing Expectations)\n", "\tlog(P(O|lambda)) = -355.5365366208815\n", "[INFO] Iteration 84\n", "\tAlpha-Pass\n", "\tBeta-Pass\n", "\tDi-Gamma and Gamma Computation (Expectations)\n", "\tReestimating HMM paramseters (Maximizing Expectations)\n", "\tlog(P(O|lambda)) = -355.5364919417726\n", "[INFO] Iteration 85\n", "\tAlpha-Pass\n", "\tBeta-Pass\n", "\tDi-Gamma and Gamma Computation (Expectations)\n", "\tReestimating HMM paramseters (Maximizing Expectations)\n", "\tlog(P(O|lambda)) = -355.53644544786556\n", "[INFO] Iteration 86\n", "\tAlpha-Pass\n", "\tBeta-Pass\n", "\tDi-Gamma and Gamma Computation (Expectations)\n", "\tReestimating HMM paramseters (Maximizing Expectations)\n", "\tlog(P(O|lambda)) = -355.53639706539343\n", "[INFO] Iteration 87\n", "\tAlpha-Pass\n", "\tBeta-Pass\n", "\tDi-Gamma and Gamma Computation (Expectations)\n", "\tReestimating HMM paramseters (Maximizing Expectations)\n", "\tlog(P(O|lambda)) = -355.5363467176576\n", "[INFO] Iteration 88\n", "\tAlpha-Pass\n", "\tBeta-Pass\n", "\tDi-Gamma and Gamma Computation (Expectations)\n", "\tReestimating HMM paramseters (Maximizing Expectations)\n", "\tlog(P(O|lambda)) = -355.53629432497627\n", "[INFO] Iteration 89\n", "\tAlpha-Pass\n", "\tBeta-Pass\n", "\tDi-Gamma and Gamma Computation (Expectations)\n", "\tReestimating HMM paramseters (Maximizing Expectations)\n", "\tlog(P(O|lambda)) = -355.53623980449777\n", "[INFO] Iteration 90\n", "\tAlpha-Pass\n", "\tBeta-Pass\n", "\tDi-Gamma and Gamma Computation (Expectations)\n", "\tReestimating HMM paramseters (Maximizing Expectations)\n", "\tlog(P(O|lambda)) = -355.5361830701436\n", "[INFO] Iteration 91\n", "\tAlpha-Pass\n", "\tBeta-Pass\n", "\tDi-Gamma and Gamma Computation (Expectations)\n", "\tReestimating HMM paramseters (Maximizing Expectations)\n", "\tlog(P(O|lambda)) = -355.5361240324902\n", "[INFO] Iteration 92\n", "\tAlpha-Pass\n", "\tBeta-Pass\n", "\tDi-Gamma and Gamma Computation (Expectations)\n", "\tReestimating HMM paramseters (Maximizing Expectations)\n", "\tlog(P(O|lambda)) = -355.5360625986268\n", "[INFO] Iteration 93\n", "\tAlpha-Pass\n", "\tBeta-Pass\n", "\tDi-Gamma and Gamma Computation (Expectations)\n", "\tReestimating HMM paramseters (Maximizing Expectations)\n", "\tlog(P(O|lambda)) = -355.5359986720357\n", "[INFO] Iteration 94\n", "\tAlpha-Pass\n", "\tBeta-Pass\n", "\tDi-Gamma and Gamma Computation (Expectations)\n", "\tReestimating HMM paramseters (Maximizing Expectations)\n", "\tlog(P(O|lambda)) = -355.5359321525011\n", "[INFO] Iteration 95\n", "\tAlpha-Pass\n", "\tBeta-Pass\n", "\tDi-Gamma and Gamma Computation (Expectations)\n", "\tReestimating HMM paramseters (Maximizing Expectations)\n", "\tlog(P(O|lambda)) = -355.53586293595026\n", "[INFO] Iteration 96\n", "\tAlpha-Pass\n", "\tBeta-Pass\n", "\tDi-Gamma and Gamma Computation (Expectations)\n", "\tReestimating HMM paramseters (Maximizing Expectations)\n", "\tlog(P(O|lambda)) = -355.535790914329\n", "[INFO] Iteration 97\n", "\tAlpha-Pass\n", "\tBeta-Pass\n", "\tDi-Gamma and Gamma Computation (Expectations)\n", "\tReestimating HMM paramseters (Maximizing Expectations)\n", "\tlog(P(O|lambda)) = -355.535715975481\n", "[INFO] Iteration 98\n", "\tAlpha-Pass\n", "\tBeta-Pass\n", "\tDi-Gamma and Gamma Computation (Expectations)\n", "\tReestimating HMM paramseters (Maximizing Expectations)\n", "\tlog(P(O|lambda)) = -355.53563800299884\n", "[INFO] Iteration 99\n", "\tAlpha-Pass\n", "\tBeta-Pass\n", "\tDi-Gamma and Gamma Computation (Expectations)\n", "\tReestimating HMM paramseters (Maximizing Expectations)\n", "\tlog(P(O|lambda)) = -355.53555687609753\n", "[INFO] Iteration 100\n", "\tAlpha-Pass\n", "\tBeta-Pass\n", "\tDi-Gamma and Gamma Computation (Expectations)\n", "\tReestimating HMM paramseters (Maximizing Expectations)\n", "\tlog(P(O|lambda)) = -355.53547246947244\n", "[INFO] Iteration 101\n", "\tAlpha-Pass\n", "\tBeta-Pass\n", "\tDi-Gamma and Gamma Computation (Expectations)\n", "\tReestimating HMM paramseters (Maximizing Expectations)\n", "\tlog(P(O|lambda)) = -355.5353846531488\n", "[INFO] Iteration 102\n", "\tAlpha-Pass\n", "\tBeta-Pass\n", "\tDi-Gamma and Gamma Computation (Expectations)\n", "\tReestimating HMM paramseters (Maximizing Expectations)\n", "\tlog(P(O|lambda)) = -355.5352932923426\n", "[INFO] Iteration 103\n", "\tAlpha-Pass\n", "\tBeta-Pass\n", "\tDi-Gamma and Gamma Computation (Expectations)\n", "\tReestimating HMM paramseters (Maximizing Expectations)\n", "\tlog(P(O|lambda)) = -355.5351982473051\n", "[INFO] Iteration 104\n", "\tAlpha-Pass\n", "\tBeta-Pass\n", "\tDi-Gamma and Gamma Computation (Expectations)\n", "\tReestimating HMM paramseters (Maximizing Expectations)\n", "\tlog(P(O|lambda)) = -355.53509937318046\n", "[INFO] Iteration 105\n", "\tAlpha-Pass\n", "\tBeta-Pass\n", "\tDi-Gamma and Gamma Computation (Expectations)\n", "\tReestimating HMM paramseters (Maximizing Expectations)\n", "\tlog(P(O|lambda)) = -355.534996519834\n", "[INFO] Iteration 106\n", "\tAlpha-Pass\n", "\tBeta-Pass\n", "\tDi-Gamma and Gamma Computation (Expectations)\n", "\tReestimating HMM paramseters (Maximizing Expectations)\n", "\tlog(P(O|lambda)) = -355.5348895317102\n", "[INFO] Iteration 107\n", "\tAlpha-Pass\n", "\tBeta-Pass\n", "\tDi-Gamma and Gamma Computation (Expectations)\n", "\tReestimating HMM paramseters (Maximizing Expectations)\n", "\tlog(P(O|lambda)) = -355.5347782476714\n", "[INFO] Iteration 108\n", "\tAlpha-Pass\n", "\tBeta-Pass\n", "\tDi-Gamma and Gamma Computation (Expectations)\n", "\tReestimating HMM paramseters (Maximizing Expectations)\n", "\tlog(P(O|lambda)) = -355.53466250080663\n", "[INFO] Iteration 109\n", "\tAlpha-Pass\n", "\tBeta-Pass\n", "\tDi-Gamma and Gamma Computation (Expectations)\n", "\tReestimating HMM paramseters (Maximizing Expectations)\n", "\tlog(P(O|lambda)) = -355.53454211831223\n", "[INFO] Iteration 110\n", "\tAlpha-Pass\n", "\tBeta-Pass\n", "\tDi-Gamma and Gamma Computation (Expectations)\n", "\tReestimating HMM paramseters (Maximizing Expectations)\n", "\tlog(P(O|lambda)) = -355.5344169212586\n", "[INFO] Iteration 111\n", "\tAlpha-Pass\n", "\tBeta-Pass\n", "\tDi-Gamma and Gamma Computation (Expectations)\n", "\tReestimating HMM paramseters (Maximizing Expectations)\n", "\tlog(P(O|lambda)) = -355.5342867244554\n", "[INFO] Iteration 112\n", "\tAlpha-Pass\n", "\tBeta-Pass\n", "\tDi-Gamma and Gamma Computation (Expectations)\n", "\tReestimating HMM paramseters (Maximizing Expectations)\n", "\tlog(P(O|lambda)) = -355.53415133624037\n", "[INFO] Iteration 113\n", "\tAlpha-Pass\n", "\tBeta-Pass\n", "\tDi-Gamma and Gamma Computation (Expectations)\n", "\tReestimating HMM paramseters (Maximizing Expectations)\n", "\tlog(P(O|lambda)) = -355.53401055831233\n", "[INFO] Iteration 114\n", "\tAlpha-Pass\n", "\tBeta-Pass\n", "\tDi-Gamma and Gamma Computation (Expectations)\n", "\tReestimating HMM paramseters (Maximizing Expectations)\n", "\tlog(P(O|lambda)) = -355.53386418548524\n", "[INFO] Iteration 115\n", "\tAlpha-Pass\n", "\tBeta-Pass\n", "\tDi-Gamma and Gamma Computation (Expectations)\n", "\tReestimating HMM paramseters (Maximizing Expectations)\n", "\tlog(P(O|lambda)) = -355.5337120055283\n", "[INFO] Iteration 116\n", "\tAlpha-Pass\n", "\tBeta-Pass\n", "\tDi-Gamma and Gamma Computation (Expectations)\n", "\tReestimating HMM paramseters (Maximizing Expectations)\n", "\tlog(P(O|lambda)) = -355.53355379891514\n", "[INFO] Iteration 117\n", "\tAlpha-Pass\n" ] }, { "name": "stdout", "output_type": "stream", "text": [ "\tBeta-Pass\n", "\tDi-Gamma and Gamma Computation (Expectations)\n", "\tReestimating HMM paramseters (Maximizing Expectations)\n", "\tlog(P(O|lambda)) = -355.53338933858635\n", "[INFO] Iteration 118\n", "\tAlpha-Pass\n", "\tBeta-Pass\n", "\tDi-Gamma and Gamma Computation (Expectations)\n", "\tReestimating HMM paramseters (Maximizing Expectations)\n", "\tlog(P(O|lambda)) = -355.53321838970174\n", "[INFO] Iteration 119\n", "\tAlpha-Pass\n", "\tBeta-Pass\n", "\tDi-Gamma and Gamma Computation (Expectations)\n", "\tReestimating HMM paramseters (Maximizing Expectations)\n", "\tlog(P(O|lambda)) = -355.53304070937565\n", "[INFO] Iteration 120\n", "\tAlpha-Pass\n", "\tBeta-Pass\n", "\tDi-Gamma and Gamma Computation (Expectations)\n", "\tReestimating HMM paramseters (Maximizing Expectations)\n", "\tlog(P(O|lambda)) = -355.5328560463718\n", "[INFO] Iteration 121\n", "\tAlpha-Pass\n", "\tBeta-Pass\n", "\tDi-Gamma and Gamma Computation (Expectations)\n", "\tReestimating HMM paramseters (Maximizing Expectations)\n", "\tlog(P(O|lambda)) = -355.5326641407696\n", "[INFO] Iteration 122\n", "\tAlpha-Pass\n", "\tBeta-Pass\n", "\tDi-Gamma and Gamma Computation (Expectations)\n", "\tReestimating HMM paramseters (Maximizing Expectations)\n", "\tlog(P(O|lambda)) = -355.53246472364697\n", "[INFO] Iteration 123\n", "\tAlpha-Pass\n", "\tBeta-Pass\n", "\tDi-Gamma and Gamma Computation (Expectations)\n", "\tReestimating HMM paramseters (Maximizing Expectations)\n", "\tlog(P(O|lambda)) = -355.532257516661\n", "[INFO] Iteration 124\n", "\tAlpha-Pass\n", "\tBeta-Pass\n", "\tDi-Gamma and Gamma Computation (Expectations)\n", "\tReestimating HMM paramseters (Maximizing Expectations)\n", "\tlog(P(O|lambda)) = -355.53204223160867\n", "[INFO] Iteration 125\n", "\tAlpha-Pass\n", "\tBeta-Pass\n", "\tDi-Gamma and Gamma Computation (Expectations)\n", "\tReestimating HMM paramseters (Maximizing Expectations)\n", "\tlog(P(O|lambda)) = -355.53181856997315\n", "[INFO] Iteration 126\n", "\tAlpha-Pass\n", "\tBeta-Pass\n", "\tDi-Gamma and Gamma Computation (Expectations)\n", "\tReestimating HMM paramseters (Maximizing Expectations)\n", "\tlog(P(O|lambda)) = -355.5315862223521\n", "[INFO] Iteration 127\n", "\tAlpha-Pass\n", "\tBeta-Pass\n", "\tDi-Gamma and Gamma Computation (Expectations)\n", "\tReestimating HMM paramseters (Maximizing Expectations)\n", "\tlog(P(O|lambda)) = -355.5313448678582\n", "[INFO] Iteration 128\n", "\tAlpha-Pass\n", "\tBeta-Pass\n", "\tDi-Gamma and Gamma Computation (Expectations)\n", "\tReestimating HMM paramseters (Maximizing Expectations)\n", "\tlog(P(O|lambda)) = -355.53109417344336\n", "[INFO] Iteration 129\n", "\tAlpha-Pass\n", "\tBeta-Pass\n", "\tDi-Gamma and Gamma Computation (Expectations)\n", "\tReestimating HMM paramseters (Maximizing Expectations)\n", "\tlog(P(O|lambda)) = -355.5308337930911\n", "[INFO] Iteration 130\n", "\tAlpha-Pass\n", "\tBeta-Pass\n", "\tDi-Gamma and Gamma Computation (Expectations)\n", "\tReestimating HMM paramseters (Maximizing Expectations)\n", "\tlog(P(O|lambda)) = -355.5305633669549\n", "[INFO] Iteration 131\n", "\tAlpha-Pass\n", "\tBeta-Pass\n", "\tDi-Gamma and Gamma Computation (Expectations)\n", "\tReestimating HMM paramseters (Maximizing Expectations)\n", "\tlog(P(O|lambda)) = -355.53028252034943\n", "[INFO] Iteration 132\n", "\tAlpha-Pass\n", "\tBeta-Pass\n", "\tDi-Gamma and Gamma Computation (Expectations)\n", "\tReestimating HMM paramseters (Maximizing Expectations)\n", "\tlog(P(O|lambda)) = -355.5299908626253\n", "[INFO] Iteration 133\n", "\tAlpha-Pass\n", "\tBeta-Pass\n", "\tDi-Gamma and Gamma Computation (Expectations)\n", "\tReestimating HMM paramseters (Maximizing Expectations)\n", "\tlog(P(O|lambda)) = -355.5296879858375\n", "[INFO] Iteration 134\n", "\tAlpha-Pass\n", "\tBeta-Pass\n", "\tDi-Gamma and Gamma Computation (Expectations)\n", "\tReestimating HMM paramseters (Maximizing Expectations)\n", "\tlog(P(O|lambda)) = -355.5293734633282\n", "[INFO] Iteration 135\n", "\tAlpha-Pass\n", "\tBeta-Pass\n", "\tDi-Gamma and Gamma Computation (Expectations)\n", "\tReestimating HMM paramseters (Maximizing Expectations)\n", "\tlog(P(O|lambda)) = -355.5290468480278\n", "[INFO] Iteration 136\n", "\tAlpha-Pass\n", "\tBeta-Pass\n", "\tDi-Gamma and Gamma Computation (Expectations)\n", "\tReestimating HMM paramseters (Maximizing Expectations)\n", "\tlog(P(O|lambda)) = -355.52870767056174\n", "[INFO] Iteration 137\n", "\tAlpha-Pass\n", "\tBeta-Pass\n", "\tDi-Gamma and Gamma Computation (Expectations)\n", "\tReestimating HMM paramseters (Maximizing Expectations)\n", "\tlog(P(O|lambda)) = -355.5283554371199\n", "[INFO] Iteration 138\n", "\tAlpha-Pass\n", "\tBeta-Pass\n", "\tDi-Gamma and Gamma Computation (Expectations)\n", "\tReestimating HMM paramseters (Maximizing Expectations)\n", "\tlog(P(O|lambda)) = -355.5279896269999\n", "[INFO] Iteration 139\n", "\tAlpha-Pass\n", "\tBeta-Pass\n", "\tDi-Gamma and Gamma Computation (Expectations)\n", "\tReestimating HMM paramseters (Maximizing Expectations)\n", "\tlog(P(O|lambda)) = -355.5276096898566\n", "[INFO] Iteration 140\n", "\tAlpha-Pass\n", "\tBeta-Pass\n", "\tDi-Gamma and Gamma Computation (Expectations)\n", "\tReestimating HMM paramseters (Maximizing Expectations)\n", "\tlog(P(O|lambda)) = -355.5272150425824\n", "[INFO] Iteration 141\n", "\tAlpha-Pass\n", "\tBeta-Pass\n", "\tDi-Gamma and Gamma Computation (Expectations)\n", "\tReestimating HMM paramseters (Maximizing Expectations)\n", "\tlog(P(O|lambda)) = -355.5268050657945\n", "[INFO] Iteration 142\n", "\tAlpha-Pass\n", "\tBeta-Pass\n", "\tDi-Gamma and Gamma Computation (Expectations)\n", "\tReestimating HMM paramseters (Maximizing Expectations)\n", "\tlog(P(O|lambda)) = -355.5263790998092\n", "[INFO] Iteration 143\n", "\tAlpha-Pass\n", "\tBeta-Pass\n", "\tDi-Gamma and Gamma Computation (Expectations)\n", "\tReestimating HMM paramseters (Maximizing Expectations)\n", "\tlog(P(O|lambda)) = -355.5259364401795\n", "[INFO] Iteration 144\n", "\tAlpha-Pass\n", "\tBeta-Pass\n", "\tDi-Gamma and Gamma Computation (Expectations)\n", "\tReestimating HMM paramseters (Maximizing Expectations)\n", "\tlog(P(O|lambda)) = -355.5254763326334\n", "[INFO] Iteration 145\n", "\tAlpha-Pass\n", "\tBeta-Pass\n", "\tDi-Gamma and Gamma Computation (Expectations)\n", "\tReestimating HMM paramseters (Maximizing Expectations)\n", "\tlog(P(O|lambda)) = -355.5249979673538\n", "[INFO] Iteration 146\n", "\tAlpha-Pass\n", "\tBeta-Pass\n", "\tDi-Gamma and Gamma Computation (Expectations)\n", "\tReestimating HMM paramseters (Maximizing Expectations)\n", "\tlog(P(O|lambda)) = -355.5245004725471\n", "[INFO] Iteration 147\n", "\tAlpha-Pass\n", "\tBeta-Pass\n", "\tDi-Gamma and Gamma Computation (Expectations)\n", "\tReestimating HMM paramseters (Maximizing Expectations)\n", "\tlog(P(O|lambda)) = -355.5239829072695\n", "[INFO] Iteration 148\n", "\tAlpha-Pass\n", "\tBeta-Pass\n", "\tDi-Gamma and Gamma Computation (Expectations)\n", "\tReestimating HMM paramseters (Maximizing Expectations)\n", "\tlog(P(O|lambda)) = -355.5234442532626\n", "[INFO] Iteration 149\n", "\tAlpha-Pass\n", "\tBeta-Pass\n", "\tDi-Gamma and Gamma Computation (Expectations)\n", "\tReestimating HMM paramseters (Maximizing Expectations)\n", "\tlog(P(O|lambda)) = -355.5228834058788\n", "[INFO] Iteration 150\n", "\tAlpha-Pass\n", "\tBeta-Pass\n", "\tDi-Gamma and Gamma Computation (Expectations)\n", "\tReestimating HMM paramseters (Maximizing Expectations)\n", "\tlog(P(O|lambda)) = -355.522299163824\n", "[INFO] Iteration 151\n", "\tAlpha-Pass\n", "\tBeta-Pass\n", "\tDi-Gamma and Gamma Computation (Expectations)\n", "\tReestimating HMM paramseters (Maximizing Expectations)\n", "\tlog(P(O|lambda)) = -355.521690217647\n", "[INFO] Iteration 152\n", "\tAlpha-Pass\n", "\tBeta-Pass\n", "\tDi-Gamma and Gamma Computation (Expectations)\n", "\tReestimating HMM paramseters (Maximizing Expectations)\n", "\tlog(P(O|lambda)) = -355.52105513685655\n", "[INFO] Iteration 153\n", "\tAlpha-Pass\n", "\tBeta-Pass\n", "\tDi-Gamma and Gamma Computation (Expectations)\n", "\tReestimating HMM paramseters (Maximizing Expectations)\n", "\tlog(P(O|lambda)) = -355.52039235535455\n", "[INFO] Iteration 154\n", "\tAlpha-Pass\n", "\tBeta-Pass\n", "\tDi-Gamma and Gamma Computation (Expectations)\n", "\tReestimating HMM paramseters (Maximizing Expectations)\n", "\tlog(P(O|lambda)) = -355.5197001551221\n", "[INFO] Iteration 155\n", "\tAlpha-Pass\n", "\tBeta-Pass\n", "\tDi-Gamma and Gamma Computation (Expectations)\n", "\tReestimating HMM paramseters (Maximizing Expectations)\n", "\tlog(P(O|lambda)) = -355.5189766478439\n", "[INFO] Iteration 156\n", "\tAlpha-Pass\n", "\tBeta-Pass\n", "\tDi-Gamma and Gamma Computation (Expectations)\n", "\tReestimating HMM paramseters (Maximizing Expectations)\n", "\tlog(P(O|lambda)) = -355.5182197541866\n", "[INFO] Iteration 157\n", "\tAlpha-Pass\n", "\tBeta-Pass\n", "\tDi-Gamma and Gamma Computation (Expectations)\n", "\tReestimating HMM paramseters (Maximizing Expectations)\n", "\tlog(P(O|lambda)) = -355.51742718042647\n", "[INFO] Iteration 158\n", "\tAlpha-Pass\n", "\tBeta-Pass\n", "\tDi-Gamma and Gamma Computation (Expectations)\n", "\tReestimating HMM paramseters (Maximizing Expectations)\n", "\tlog(P(O|lambda)) = -355.5165963920879\n", "[INFO] Iteration 159\n", "\tAlpha-Pass\n", "\tBeta-Pass\n", "\tDi-Gamma and Gamma Computation (Expectations)\n", "\tReestimating HMM paramseters (Maximizing Expectations)\n", "\tlog(P(O|lambda)) = -355.5157245840397\n", "[INFO] Iteration 160\n", "\tAlpha-Pass\n", "\tBeta-Pass\n", "\tDi-Gamma and Gamma Computation (Expectations)\n", "\tReestimating HMM paramseters (Maximizing Expectations)\n", "\tlog(P(O|lambda)) = -355.5148086466635\n", "[INFO] Iteration 161\n", "\tAlpha-Pass\n", "\tBeta-Pass\n", "\tDi-Gamma and Gamma Computation (Expectations)\n", "\tReestimating HMM paramseters (Maximizing Expectations)\n", "\tlog(P(O|lambda)) = -355.5138451273826\n", "[INFO] Iteration 162\n", "\tAlpha-Pass\n", "\tBeta-Pass\n", "\tDi-Gamma and Gamma Computation (Expectations)\n" ] }, { "name": "stdout", "output_type": "stream", "text": [ "\tReestimating HMM paramseters (Maximizing Expectations)\n", "\tlog(P(O|lambda)) = -355.5128301868858\n", "[INFO] Iteration 163\n", "\tAlpha-Pass\n", "\tBeta-Pass\n", "\tDi-Gamma and Gamma Computation (Expectations)\n", "\tReestimating HMM paramseters (Maximizing Expectations)\n", "\tlog(P(O|lambda)) = -355.5117595491361\n", "[INFO] Iteration 164\n", "\tAlpha-Pass\n", "\tBeta-Pass\n", "\tDi-Gamma and Gamma Computation (Expectations)\n", "\tReestimating HMM paramseters (Maximizing Expectations)\n", "\tlog(P(O|lambda)) = -355.5106284442557\n", "[INFO] Iteration 165\n", "\tAlpha-Pass\n", "\tBeta-Pass\n", "\tDi-Gamma and Gamma Computation (Expectations)\n", "\tReestimating HMM paramseters (Maximizing Expectations)\n", "\tlog(P(O|lambda)) = -355.50943154289047\n", "[INFO] Iteration 166\n", "\tAlpha-Pass\n", "\tBeta-Pass\n", "\tDi-Gamma and Gamma Computation (Expectations)\n", "\tReestimating HMM paramseters (Maximizing Expectations)\n", "\tlog(P(O|lambda)) = -355.5081628808217\n", "[INFO] Iteration 167\n", "\tAlpha-Pass\n", "\tBeta-Pass\n", "\tDi-Gamma and Gamma Computation (Expectations)\n", "\tReestimating HMM paramseters (Maximizing Expectations)\n", "\tlog(P(O|lambda)) = -355.5068157718962\n", "[INFO] Iteration 168\n", "\tAlpha-Pass\n", "\tBeta-Pass\n", "\tDi-Gamma and Gamma Computation (Expectations)\n", "\tReestimating HMM paramseters (Maximizing Expectations)\n", "\tlog(P(O|lambda)) = -355.5053827073384\n", "[INFO] Iteration 169\n", "\tAlpha-Pass\n", "\tBeta-Pass\n", "\tDi-Gamma and Gamma Computation (Expectations)\n", "\tReestimating HMM paramseters (Maximizing Expectations)\n", "\tlog(P(O|lambda)) = -355.5038552387888\n", "[INFO] Iteration 170\n", "\tAlpha-Pass\n", "\tBeta-Pass\n", "\tDi-Gamma and Gamma Computation (Expectations)\n", "\tReestimating HMM paramseters (Maximizing Expectations)\n", "\tlog(P(O|lambda)) = -355.5022238421465\n", "[INFO] Iteration 171\n", "\tAlpha-Pass\n", "\tBeta-Pass\n", "\tDi-Gamma and Gamma Computation (Expectations)\n", "\tReestimating HMM paramseters (Maximizing Expectations)\n", "\tlog(P(O|lambda)) = -355.50047775840574\n", "[INFO] Iteration 172\n", "\tAlpha-Pass\n", "\tBeta-Pass\n", "\tDi-Gamma and Gamma Computation (Expectations)\n", "\tReestimating HMM paramseters (Maximizing Expectations)\n", "\tlog(P(O|lambda)) = -355.4986048070228\n", "[INFO] Iteration 173\n", "\tAlpha-Pass\n", "\tBeta-Pass\n", "\tDi-Gamma and Gamma Computation (Expectations)\n", "\tReestimating HMM paramseters (Maximizing Expectations)\n", "\tlog(P(O|lambda)) = -355.49659116628055\n", "[INFO] Iteration 174\n", "\tAlpha-Pass\n", "\tBeta-Pass\n", "\tDi-Gamma and Gamma Computation (Expectations)\n", "\tReestimating HMM paramseters (Maximizing Expectations)\n", "\tlog(P(O|lambda)) = -355.49442111385434\n", "[INFO] Iteration 175\n", "\tAlpha-Pass\n", "\tBeta-Pass\n", "\tDi-Gamma and Gamma Computation (Expectations)\n", "\tReestimating HMM paramseters (Maximizing Expectations)\n", "\tlog(P(O|lambda)) = -355.4920767192023\n", "[INFO] Iteration 176\n", "\tAlpha-Pass\n", "\tBeta-Pass\n", "\tDi-Gamma and Gamma Computation (Expectations)\n", "\tReestimating HMM paramseters (Maximizing Expectations)\n", "\tlog(P(O|lambda)) = -355.4895374774088\n", "[INFO] Iteration 177\n", "\tAlpha-Pass\n", "\tBeta-Pass\n", "\tDi-Gamma and Gamma Computation (Expectations)\n", "\tReestimating HMM paramseters (Maximizing Expectations)\n", "\tlog(P(O|lambda)) = -355.48677987156094\n", "[INFO] Iteration 178\n", "\tAlpha-Pass\n", "\tBeta-Pass\n", "\tDi-Gamma and Gamma Computation (Expectations)\n", "\tReestimating HMM paramseters (Maximizing Expectations)\n", "\tlog(P(O|lambda)) = -355.4837768475381\n", "[INFO] Iteration 179\n", "\tAlpha-Pass\n", "\tBeta-Pass\n", "\tDi-Gamma and Gamma Computation (Expectations)\n", "\tReestimating HMM paramseters (Maximizing Expectations)\n", "\tlog(P(O|lambda)) = -355.480497180892\n", "[INFO] Iteration 180\n", "\tAlpha-Pass\n", "\tBeta-Pass\n", "\tDi-Gamma and Gamma Computation (Expectations)\n", "\tReestimating HMM paramseters (Maximizing Expectations)\n", "\tlog(P(O|lambda)) = -355.4769047102234\n", "[INFO] Iteration 181\n", "\tAlpha-Pass\n", "\tBeta-Pass\n", "\tDi-Gamma and Gamma Computation (Expectations)\n", "\tReestimating HMM paramseters (Maximizing Expectations)\n", "\tlog(P(O|lambda)) = -355.47295740450625\n", "[INFO] Iteration 182\n", "\tAlpha-Pass\n", "\tBeta-Pass\n", "\tDi-Gamma and Gamma Computation (Expectations)\n", "\tReestimating HMM paramseters (Maximizing Expectations)\n", "\tlog(P(O|lambda)) = -355.4686062228064\n", "[INFO] Iteration 183\n", "\tAlpha-Pass\n", "\tBeta-Pass\n", "\tDi-Gamma and Gamma Computation (Expectations)\n", "\tReestimating HMM paramseters (Maximizing Expectations)\n", "\tlog(P(O|lambda)) = -355.4637937130249\n", "[INFO] Iteration 184\n", "\tAlpha-Pass\n", "\tBeta-Pass\n", "\tDi-Gamma and Gamma Computation (Expectations)\n", "\tReestimating HMM paramseters (Maximizing Expectations)\n", "\tlog(P(O|lambda)) = -355.45845228063286\n", "[INFO] Iteration 185\n", "\tAlpha-Pass\n", "\tBeta-Pass\n", "\tDi-Gamma and Gamma Computation (Expectations)\n", "\tReestimating HMM paramseters (Maximizing Expectations)\n", "\tlog(P(O|lambda)) = -355.4525020377449\n", "[INFO] Iteration 186\n", "\tAlpha-Pass\n", "\tBeta-Pass\n", "\tDi-Gamma and Gamma Computation (Expectations)\n", "\tReestimating HMM paramseters (Maximizing Expectations)\n", "\tlog(P(O|lambda)) = -355.44584811486493\n", "[INFO] Iteration 187\n", "\tAlpha-Pass\n", "\tBeta-Pass\n", "\tDi-Gamma and Gamma Computation (Expectations)\n", "\tReestimating HMM paramseters (Maximizing Expectations)\n", "\tlog(P(O|lambda)) = -355.43837728037647\n", "[INFO] Iteration 188\n", "\tAlpha-Pass\n", "\tBeta-Pass\n", "\tDi-Gamma and Gamma Computation (Expectations)\n", "\tReestimating HMM paramseters (Maximizing Expectations)\n", "\tlog(P(O|lambda)) = -355.429953661804\n", "[INFO] Iteration 189\n", "\tAlpha-Pass\n", "\tBeta-Pass\n", "\tDi-Gamma and Gamma Computation (Expectations)\n", "\tReestimating HMM paramseters (Maximizing Expectations)\n", "\tlog(P(O|lambda)) = -355.420413293082\n", "[INFO] Iteration 190\n", "\tAlpha-Pass\n", "\tBeta-Pass\n", "\tDi-Gamma and Gamma Computation (Expectations)\n", "\tReestimating HMM paramseters (Maximizing Expectations)\n", "\tlog(P(O|lambda)) = -355.40955711569745\n", "[INFO] Iteration 191\n", "\tAlpha-Pass\n", "\tBeta-Pass\n", "\tDi-Gamma and Gamma Computation (Expectations)\n", "\tReestimating HMM paramseters (Maximizing Expectations)\n", "\tlog(P(O|lambda)) = -355.3971419272462\n", "[INFO] Iteration 192\n", "\tAlpha-Pass\n", "\tBeta-Pass\n", "\tDi-Gamma and Gamma Computation (Expectations)\n", "\tReestimating HMM paramseters (Maximizing Expectations)\n", "\tlog(P(O|lambda)) = -355.38286858205026\n", "[INFO] Iteration 193\n", "\tAlpha-Pass\n", "\tBeta-Pass\n", "\tDi-Gamma and Gamma Computation (Expectations)\n", "\tReestimating HMM paramseters (Maximizing Expectations)\n", "\tlog(P(O|lambda)) = -355.36636648035534\n", "[INFO] Iteration 194\n", "\tAlpha-Pass\n", "\tBeta-Pass\n", "\tDi-Gamma and Gamma Computation (Expectations)\n", "\tReestimating HMM paramseters (Maximizing Expectations)\n", "\tlog(P(O|lambda)) = -355.3471729987035\n", "[INFO] Iteration 195\n", "\tAlpha-Pass\n", "\tBeta-Pass\n", "\tDi-Gamma and Gamma Computation (Expectations)\n", "\tReestimating HMM paramseters (Maximizing Expectations)\n", "\tlog(P(O|lambda)) = -355.3247059581231\n", "[INFO] Iteration 196\n", "\tAlpha-Pass\n", "\tBeta-Pass\n", "\tDi-Gamma and Gamma Computation (Expectations)\n", "\tReestimating HMM paramseters (Maximizing Expectations)\n", "\tlog(P(O|lambda)) = -355.2982264145419\n", "[INFO] Iteration 197\n", "\tAlpha-Pass\n", "\tBeta-Pass\n", "\tDi-Gamma and Gamma Computation (Expectations)\n", "\tReestimating HMM paramseters (Maximizing Expectations)\n", "\tlog(P(O|lambda)) = -355.26678785655184\n", "[INFO] Iteration 198\n", "\tAlpha-Pass\n", "\tBeta-Pass\n", "\tDi-Gamma and Gamma Computation (Expectations)\n", "\tReestimating HMM paramseters (Maximizing Expectations)\n", "\tlog(P(O|lambda)) = -355.2291661073605\n", "[INFO] Iteration 199\n", "\tAlpha-Pass\n", "\tBeta-Pass\n", "\tDi-Gamma and Gamma Computation (Expectations)\n", "\tReestimating HMM paramseters (Maximizing Expectations)\n", "\tlog(P(O|lambda)) = -355.18376153574434\n", "[INFO] Iteration 200\n", "\tAlpha-Pass\n", "\tBeta-Pass\n", "\tDi-Gamma and Gamma Computation (Expectations)\n", "\tReestimating HMM paramseters (Maximizing Expectations)\n", "\tlog(P(O|lambda)) = -355.1284610927334\n", "[INFO] Iteration 201\n", "\tAlpha-Pass\n", "\tBeta-Pass\n", "\tDi-Gamma and Gamma Computation (Expectations)\n", "\tReestimating HMM paramseters (Maximizing Expectations)\n", "\tlog(P(O|lambda)) = -355.06044143763086\n", "[INFO] Iteration 202\n", "\tAlpha-Pass\n", "\tBeta-Pass\n", "\tDi-Gamma and Gamma Computation (Expectations)\n", "\tReestimating HMM paramseters (Maximizing Expectations)\n", "\tlog(P(O|lambda)) = -354.9758848076364\n", "[INFO] Iteration 203\n", "\tAlpha-Pass\n", "\tBeta-Pass\n", "\tDi-Gamma and Gamma Computation (Expectations)\n", "\tReestimating HMM paramseters (Maximizing Expectations)\n", "\tlog(P(O|lambda)) = -354.86956451387425\n", "[INFO] Iteration 204\n", "\tAlpha-Pass\n", "\tBeta-Pass\n", "\tDi-Gamma and Gamma Computation (Expectations)\n", "\tReestimating HMM paramseters (Maximizing Expectations)\n", "\tlog(P(O|lambda)) = -354.73423440399614\n", "[INFO] Iteration 205\n", "\tAlpha-Pass\n", "\tBeta-Pass\n", "\tDi-Gamma and Gamma Computation (Expectations)\n", "\tReestimating HMM paramseters (Maximizing Expectations)\n", "\tlog(P(O|lambda)) = -354.5597229397652\n", "[INFO] Iteration 206\n", "\tAlpha-Pass\n", "\tBeta-Pass\n", "\tDi-Gamma and Gamma Computation (Expectations)\n", "\tReestimating HMM paramseters (Maximizing Expectations)\n", "\tlog(P(O|lambda)) = -354.33158453555615\n", "[INFO] Iteration 207\n", "\tAlpha-Pass\n", "\tBeta-Pass\n", "\tDi-Gamma and Gamma Computation (Expectations)\n", "\tReestimating HMM paramseters (Maximizing Expectations)\n", "\tlog(P(O|lambda)) = -354.029099613016\n", "[INFO] Iteration 208\n", "\tAlpha-Pass\n", "\tBeta-Pass\n", "\tDi-Gamma and Gamma Computation (Expectations)\n", "\tReestimating HMM paramseters (Maximizing Expectations)\n", "\tlog(P(O|lambda)) = -353.6223587795442\n", "[INFO] Iteration 209\n", "\tAlpha-Pass\n", "\tBeta-Pass\n", "\tDi-Gamma and Gamma Computation (Expectations)\n", "\tReestimating HMM paramseters (Maximizing Expectations)\n", "\tlog(P(O|lambda)) = -353.06818734483596\n", "[INFO] Iteration 210\n", "\tAlpha-Pass\n", "\tBeta-Pass\n" ] }, { "name": "stdout", "output_type": "stream", "text": [ "\tDi-Gamma and Gamma Computation (Expectations)\n", "\tReestimating HMM paramseters (Maximizing Expectations)\n", "\tlog(P(O|lambda)) = -352.30497987414554\n", "[INFO] Iteration 211\n", "\tAlpha-Pass\n", "\tBeta-Pass\n", "\tDi-Gamma and Gamma Computation (Expectations)\n", "\tReestimating HMM paramseters (Maximizing Expectations)\n", "\tlog(P(O|lambda)) = -351.247675244659\n", "[INFO] Iteration 212\n", "\tAlpha-Pass\n", "\tBeta-Pass\n", "\tDi-Gamma and Gamma Computation (Expectations)\n", "\tReestimating HMM paramseters (Maximizing Expectations)\n", "\tlog(P(O|lambda)) = -349.78729368037483\n", "[INFO] Iteration 213\n", "\tAlpha-Pass\n", "\tBeta-Pass\n", "\tDi-Gamma and Gamma Computation (Expectations)\n", "\tReestimating HMM paramseters (Maximizing Expectations)\n", "\tlog(P(O|lambda)) = -347.8063594772446\n", "[INFO] Iteration 214\n", "\tAlpha-Pass\n", "\tBeta-Pass\n", "\tDi-Gamma and Gamma Computation (Expectations)\n", "\tReestimating HMM paramseters (Maximizing Expectations)\n", "\tlog(P(O|lambda)) = -345.2312069904787\n", "[INFO] Iteration 215\n", "\tAlpha-Pass\n", "\tBeta-Pass\n", "\tDi-Gamma and Gamma Computation (Expectations)\n", "\tReestimating HMM paramseters (Maximizing Expectations)\n", "\tlog(P(O|lambda)) = -342.1386466540171\n", "[INFO] Iteration 216\n", "\tAlpha-Pass\n", "\tBeta-Pass\n", "\tDi-Gamma and Gamma Computation (Expectations)\n", "\tReestimating HMM paramseters (Maximizing Expectations)\n", "\tlog(P(O|lambda)) = -338.87153666326384\n", "[INFO] Iteration 217\n", "\tAlpha-Pass\n", "\tBeta-Pass\n", "\tDi-Gamma and Gamma Computation (Expectations)\n", "\tReestimating HMM paramseters (Maximizing Expectations)\n", "\tlog(P(O|lambda)) = -335.9903350774998\n", "[INFO] Iteration 218\n", "\tAlpha-Pass\n", "\tBeta-Pass\n", "\tDi-Gamma and Gamma Computation (Expectations)\n", "\tReestimating HMM paramseters (Maximizing Expectations)\n", "\tlog(P(O|lambda)) = -333.94343510380344\n", "[INFO] Iteration 219\n", "\tAlpha-Pass\n", "\tBeta-Pass\n", "\tDi-Gamma and Gamma Computation (Expectations)\n", "\tReestimating HMM paramseters (Maximizing Expectations)\n", "\tlog(P(O|lambda)) = -332.7642134099114\n", "[INFO] Iteration 220\n", "\tAlpha-Pass\n", "\tBeta-Pass\n", "\tDi-Gamma and Gamma Computation (Expectations)\n", "\tReestimating HMM paramseters (Maximizing Expectations)\n", "\tlog(P(O|lambda)) = -332.1734324630511\n", "[INFO] Iteration 221\n", "\tAlpha-Pass\n", "\tBeta-Pass\n", "\tDi-Gamma and Gamma Computation (Expectations)\n", "\tReestimating HMM paramseters (Maximizing Expectations)\n", "\tlog(P(O|lambda)) = -331.87525949280945\n", "[INFO] Iteration 222\n", "\tAlpha-Pass\n", "\tBeta-Pass\n", "\tDi-Gamma and Gamma Computation (Expectations)\n", "\tReestimating HMM paramseters (Maximizing Expectations)\n", "\tlog(P(O|lambda)) = -331.6931886507293\n", "[INFO] Iteration 223\n", "\tAlpha-Pass\n", "\tBeta-Pass\n", "\tDi-Gamma and Gamma Computation (Expectations)\n", "\tReestimating HMM paramseters (Maximizing Expectations)\n", "\tlog(P(O|lambda)) = -331.5499968529289\n", "[INFO] Iteration 224\n", "\tAlpha-Pass\n", "\tBeta-Pass\n", "\tDi-Gamma and Gamma Computation (Expectations)\n", "\tReestimating HMM paramseters (Maximizing Expectations)\n", "\tlog(P(O|lambda)) = -331.4180755183863\n", "[INFO] Iteration 225\n", "\tAlpha-Pass\n", "\tBeta-Pass\n", "\tDi-Gamma and Gamma Computation (Expectations)\n", "\tReestimating HMM paramseters (Maximizing Expectations)\n", "\tlog(P(O|lambda)) = -331.28921360371675\n", "[INFO] Iteration 226\n", "\tAlpha-Pass\n", "\tBeta-Pass\n", "\tDi-Gamma and Gamma Computation (Expectations)\n", "\tReestimating HMM paramseters (Maximizing Expectations)\n", "\tlog(P(O|lambda)) = -331.161795469624\n", "[INFO] Iteration 227\n", "\tAlpha-Pass\n", "\tBeta-Pass\n", "\tDi-Gamma and Gamma Computation (Expectations)\n", "\tReestimating HMM paramseters (Maximizing Expectations)\n", "\tlog(P(O|lambda)) = -331.03623950459576\n", "[INFO] Iteration 228\n", "\tAlpha-Pass\n", "\tBeta-Pass\n", "\tDi-Gamma and Gamma Computation (Expectations)\n", "\tReestimating HMM paramseters (Maximizing Expectations)\n", "\tlog(P(O|lambda)) = -330.9135096055029\n", "[INFO] Iteration 229\n", "\tAlpha-Pass\n", "\tBeta-Pass\n", "\tDi-Gamma and Gamma Computation (Expectations)\n", "\tReestimating HMM paramseters (Maximizing Expectations)\n", "\tlog(P(O|lambda)) = -330.7946427478861\n", "[INFO] Iteration 230\n", "\tAlpha-Pass\n", "\tBeta-Pass\n", "\tDi-Gamma and Gamma Computation (Expectations)\n", "\tReestimating HMM paramseters (Maximizing Expectations)\n", "\tlog(P(O|lambda)) = -330.68059232822395\n", "[INFO] Iteration 231\n", "\tAlpha-Pass\n", "\tBeta-Pass\n", "\tDi-Gamma and Gamma Computation (Expectations)\n", "\tReestimating HMM paramseters (Maximizing Expectations)\n", "\tlog(P(O|lambda)) = -330.5721691627316\n", "[INFO] Iteration 232\n", "\tAlpha-Pass\n", "\tBeta-Pass\n", "\tDi-Gamma and Gamma Computation (Expectations)\n", "\tReestimating HMM paramseters (Maximizing Expectations)\n", "\tlog(P(O|lambda)) = -330.4700163826751\n", "[INFO] Iteration 233\n", "\tAlpha-Pass\n", "\tBeta-Pass\n", "\tDi-Gamma and Gamma Computation (Expectations)\n", "\tReestimating HMM paramseters (Maximizing Expectations)\n", "\tlog(P(O|lambda)) = -330.37460036776037\n", "[INFO] Iteration 234\n", "\tAlpha-Pass\n", "\tBeta-Pass\n", "\tDi-Gamma and Gamma Computation (Expectations)\n", "\tReestimating HMM paramseters (Maximizing Expectations)\n", "\tlog(P(O|lambda)) = -330.2862123878198\n", "[INFO] Iteration 235\n", "\tAlpha-Pass\n", "\tBeta-Pass\n", "\tDi-Gamma and Gamma Computation (Expectations)\n", "\tReestimating HMM paramseters (Maximizing Expectations)\n", "\tlog(P(O|lambda)) = -330.204978524093\n", "[INFO] Iteration 236\n", "\tAlpha-Pass\n", "\tBeta-Pass\n", "\tDi-Gamma and Gamma Computation (Expectations)\n", "\tReestimating HMM paramseters (Maximizing Expectations)\n", "\tlog(P(O|lambda)) = -330.1308758647965\n", "[INFO] Iteration 237\n", "\tAlpha-Pass\n", "\tBeta-Pass\n", "\tDi-Gamma and Gamma Computation (Expectations)\n", "\tReestimating HMM paramseters (Maximizing Expectations)\n", "\tlog(P(O|lambda)) = -330.0637529588258\n", "[INFO] Iteration 238\n", "\tAlpha-Pass\n", "\tBeta-Pass\n", "\tDi-Gamma and Gamma Computation (Expectations)\n", "\tReestimating HMM paramseters (Maximizing Expectations)\n", "\tlog(P(O|lambda)) = -330.0033525810117\n", "[INFO] Iteration 239\n", "\tAlpha-Pass\n", "\tBeta-Pass\n", "\tDi-Gamma and Gamma Computation (Expectations)\n", "\tReestimating HMM paramseters (Maximizing Expectations)\n", "\tlog(P(O|lambda)) = -329.9493350840682\n", "[INFO] Iteration 240\n", "\tAlpha-Pass\n", "\tBeta-Pass\n", "\tDi-Gamma and Gamma Computation (Expectations)\n", "\tReestimating HMM paramseters (Maximizing Expectations)\n", "\tlog(P(O|lambda)) = -329.90130094044247\n", "[INFO] Iteration 241\n", "\tAlpha-Pass\n", "\tBeta-Pass\n", "\tDi-Gamma and Gamma Computation (Expectations)\n", "\tReestimating HMM paramseters (Maximizing Expectations)\n", "\tlog(P(O|lambda)) = -329.8588114481851\n", "[INFO] Iteration 242\n", "\tAlpha-Pass\n", "\tBeta-Pass\n", "\tDi-Gamma and Gamma Computation (Expectations)\n", "\tReestimating HMM paramseters (Maximizing Expectations)\n", "\tlog(P(O|lambda)) = -329.8214069369209\n", "[INFO] Iteration 243\n", "\tAlpha-Pass\n", "\tBeta-Pass\n", "\tDi-Gamma and Gamma Computation (Expectations)\n", "\tReestimating HMM paramseters (Maximizing Expectations)\n", "\tlog(P(O|lambda)) = -329.7886221287172\n", "[INFO] Iteration 244\n", "\tAlpha-Pass\n", "\tBeta-Pass\n", "\tDi-Gamma and Gamma Computation (Expectations)\n", "\tReestimating HMM paramseters (Maximizing Expectations)\n", "\tlog(P(O|lambda)) = -329.75999856723485\n", "[INFO] Iteration 245\n", "\tAlpha-Pass\n", "\tBeta-Pass\n", "\tDi-Gamma and Gamma Computation (Expectations)\n", "\tReestimating HMM paramseters (Maximizing Expectations)\n", "\tlog(P(O|lambda)) = -329.73509422160765\n", "[INFO] Iteration 246\n", "\tAlpha-Pass\n", "\tBeta-Pass\n", "\tDi-Gamma and Gamma Computation (Expectations)\n", "\tReestimating HMM paramseters (Maximizing Expectations)\n", "\tlog(P(O|lambda)) = -329.7134905032828\n", "[INFO] Iteration 247\n", "\tAlpha-Pass\n", "\tBeta-Pass\n", "\tDi-Gamma and Gamma Computation (Expectations)\n", "\tReestimating HMM paramseters (Maximizing Expectations)\n", "\tlog(P(O|lambda)) = -329.6947970124029\n", "[INFO] Iteration 248\n", "\tAlpha-Pass\n", "\tBeta-Pass\n", "\tDi-Gamma and Gamma Computation (Expectations)\n", "\tReestimating HMM paramseters (Maximizing Expectations)\n", "\tlog(P(O|lambda)) = -329.67865436605206\n", "[INFO] Iteration 249\n", "\tAlpha-Pass\n", "\tBeta-Pass\n", "\tDi-Gamma and Gamma Computation (Expectations)\n", "\tReestimating HMM paramseters (Maximizing Expectations)\n", "\tlog(P(O|lambda)) = -329.66473546412215\n", "[INFO] Iteration 250\n", "\tAlpha-Pass\n", "\tBeta-Pass\n", "\tDi-Gamma and Gamma Computation (Expectations)\n", "\tReestimating HMM paramseters (Maximizing Expectations)\n", "\tlog(P(O|lambda)) = -329.65274552984886\n", "[INFO] Iteration 251\n", "\tAlpha-Pass\n", "\tBeta-Pass\n", "\tDi-Gamma and Gamma Computation (Expectations)\n", "\tReestimating HMM paramseters (Maximizing Expectations)\n", "\tlog(P(O|lambda)) = -329.6424212290132\n", "[INFO] Iteration 252\n", "\tAlpha-Pass\n", "\tBeta-Pass\n", "\tDi-Gamma and Gamma Computation (Expectations)\n", "\tReestimating HMM paramseters (Maximizing Expectations)\n", "\tlog(P(O|lambda)) = -329.6335291314952\n", "[INFO] Iteration 253\n", "\tAlpha-Pass\n", "\tBeta-Pass\n", "\tDi-Gamma and Gamma Computation (Expectations)\n", "\tReestimating HMM paramseters (Maximizing Expectations)\n", "\tlog(P(O|lambda)) = -329.6258637359879\n", "[INFO] Iteration 254\n", "\tAlpha-Pass\n", "\tBeta-Pass\n", "\tDi-Gamma and Gamma Computation (Expectations)\n" ] }, { "name": "stdout", "output_type": "stream", "text": [ "\tReestimating HMM paramseters (Maximizing Expectations)\n", "\tlog(P(O|lambda)) = -329.6192452367168\n", "[INFO] Iteration 255\n", "\tAlpha-Pass\n", "\tBeta-Pass\n", "\tDi-Gamma and Gamma Computation (Expectations)\n", "\tReestimating HMM paramseters (Maximizing Expectations)\n", "\tlog(P(O|lambda)) = -329.6135171723907\n", "[INFO] Iteration 256\n", "\tAlpha-Pass\n", "\tBeta-Pass\n", "\tDi-Gamma and Gamma Computation (Expectations)\n", "\tReestimating HMM paramseters (Maximizing Expectations)\n", "\tlog(P(O|lambda)) = -329.60854406346175\n", "[INFO] Iteration 257\n", "\tAlpha-Pass\n", "\tBeta-Pass\n", "\tDi-Gamma and Gamma Computation (Expectations)\n", "\tReestimating HMM paramseters (Maximizing Expectations)\n", "\tlog(P(O|lambda)) = -329.60420911465854\n", "[INFO] Iteration 258\n", "\tAlpha-Pass\n", "\tBeta-Pass\n", "\tDi-Gamma and Gamma Computation (Expectations)\n", "\tReestimating HMM paramseters (Maximizing Expectations)\n", "\tlog(P(O|lambda)) = -329.6004120357337\n", "[INFO] Iteration 259\n", "\tAlpha-Pass\n", "\tBeta-Pass\n", "\tDi-Gamma and Gamma Computation (Expectations)\n", "\tReestimating HMM paramseters (Maximizing Expectations)\n", "\tlog(P(O|lambda)) = -329.59706701417156\n", "[INFO] Iteration 260\n", "\tAlpha-Pass\n", "\tBeta-Pass\n", "\tDi-Gamma and Gamma Computation (Expectations)\n", "\tReestimating HMM paramseters (Maximizing Expectations)\n", "\tlog(P(O|lambda)) = -329.59410085857127\n", "[INFO] Iteration 261\n", "\tAlpha-Pass\n", "\tBeta-Pass\n", "\tDi-Gamma and Gamma Computation (Expectations)\n", "\tReestimating HMM paramseters (Maximizing Expectations)\n", "\tlog(P(O|lambda)) = -329.5914513201858\n", "[INFO] Iteration 262\n", "\tAlpha-Pass\n", "\tBeta-Pass\n", "\tDi-Gamma and Gamma Computation (Expectations)\n", "\tReestimating HMM paramseters (Maximizing Expectations)\n", "\tlog(P(O|lambda)) = -329.58906559187324\n", "[INFO] Iteration 263\n", "\tAlpha-Pass\n", "\tBeta-Pass\n", "\tDi-Gamma and Gamma Computation (Expectations)\n", "\tReestimating HMM paramseters (Maximizing Expectations)\n", "\tlog(P(O|lambda)) = -329.5868989779662\n", "[INFO] Iteration 264\n", "\tAlpha-Pass\n", "\tBeta-Pass\n", "\tDi-Gamma and Gamma Computation (Expectations)\n", "\tReestimating HMM paramseters (Maximizing Expectations)\n", "\tlog(P(O|lambda)) = -329.5849137249071\n", "[INFO] Iteration 265\n", "\tAlpha-Pass\n", "\tBeta-Pass\n", "\tDi-Gamma and Gamma Computation (Expectations)\n", "\tReestimating HMM paramseters (Maximizing Expectations)\n", "\tlog(P(O|lambda)) = -329.58307800015746\n", "[INFO] Iteration 266\n", "\tAlpha-Pass\n", "\tBeta-Pass\n", "\tDi-Gamma and Gamma Computation (Expectations)\n", "\tReestimating HMM paramseters (Maximizing Expectations)\n", "\tlog(P(O|lambda)) = -329.5813650058736\n", "[INFO] Iteration 267\n", "\tAlpha-Pass\n", "\tBeta-Pass\n", "\tDi-Gamma and Gamma Computation (Expectations)\n", "\tReestimating HMM paramseters (Maximizing Expectations)\n", "\tlog(P(O|lambda)) = -329.57975221357157\n", "[INFO] Iteration 268\n", "\tAlpha-Pass\n", "\tBeta-Pass\n", "\tDi-Gamma and Gamma Computation (Expectations)\n", "\tReestimating HMM paramseters (Maximizing Expectations)\n", "\tlog(P(O|lambda)) = -329.5782207062206\n", "[INFO] Iteration 269\n", "\tAlpha-Pass\n", "\tBeta-Pass\n", "\tDi-Gamma and Gamma Computation (Expectations)\n", "\tReestimating HMM paramseters (Maximizing Expectations)\n", "\tlog(P(O|lambda)) = -329.57675461500924\n", "[INFO] Iteration 270\n", "\tAlpha-Pass\n", "\tBeta-Pass\n", "\tDi-Gamma and Gamma Computation (Expectations)\n", "\tReestimating HMM paramseters (Maximizing Expectations)\n", "\tlog(P(O|lambda)) = -329.57534063885424\n", "[INFO] Iteration 271\n", "\tAlpha-Pass\n", "\tBeta-Pass\n", "\tDi-Gamma and Gamma Computation (Expectations)\n", "\tReestimating HMM paramseters (Maximizing Expectations)\n", "\tlog(P(O|lambda)) = -329.5739676357721\n", "[INFO] Iteration 272\n", "\tAlpha-Pass\n", "\tBeta-Pass\n", "\tDi-Gamma and Gamma Computation (Expectations)\n", "\tReestimating HMM paramseters (Maximizing Expectations)\n", "\tlog(P(O|lambda)) = -329.57262627638113\n", "[INFO] Iteration 273\n", "\tAlpha-Pass\n", "\tBeta-Pass\n", "\tDi-Gamma and Gamma Computation (Expectations)\n", "\tReestimating HMM paramseters (Maximizing Expectations)\n", "\tlog(P(O|lambda)) = -329.5713087507669\n", "[INFO] Iteration 274\n", "\tAlpha-Pass\n", "\tBeta-Pass\n", "\tDi-Gamma and Gamma Computation (Expectations)\n", "\tReestimating HMM paramseters (Maximizing Expectations)\n", "\tlog(P(O|lambda)) = -329.570008521093\n", "[INFO] Iteration 275\n", "\tAlpha-Pass\n", "\tBeta-Pass\n", "\tDi-Gamma and Gamma Computation (Expectations)\n", "\tReestimating HMM paramseters (Maximizing Expectations)\n", "\tlog(P(O|lambda)) = -329.56872011320036\n", "[INFO] Iteration 276\n", "\tAlpha-Pass\n", "\tBeta-Pass\n", "\tDi-Gamma and Gamma Computation (Expectations)\n", "\tReestimating HMM paramseters (Maximizing Expectations)\n", "\tlog(P(O|lambda)) = -329.5674389413742\n", "[INFO] Iteration 277\n", "\tAlpha-Pass\n", "\tBeta-Pass\n", "\tDi-Gamma and Gamma Computation (Expectations)\n", "\tReestimating HMM paramseters (Maximizing Expectations)\n", "\tlog(P(O|lambda)) = -329.56616116123485\n", "[INFO] Iteration 278\n", "\tAlpha-Pass\n", "\tBeta-Pass\n", "\tDi-Gamma and Gamma Computation (Expectations)\n", "\tReestimating HMM paramseters (Maximizing Expectations)\n", "\tlog(P(O|lambda)) = -329.5648835464025\n", "[INFO] Iteration 279\n", "\tAlpha-Pass\n", "\tBeta-Pass\n", "\tDi-Gamma and Gamma Computation (Expectations)\n", "\tReestimating HMM paramseters (Maximizing Expectations)\n", "\tlog(P(O|lambda)) = -329.56360338523314\n", "[INFO] Iteration 280\n", "\tAlpha-Pass\n", "\tBeta-Pass\n", "\tDi-Gamma and Gamma Computation (Expectations)\n", "\tReestimating HMM paramseters (Maximizing Expectations)\n", "\tlog(P(O|lambda)) = -329.56231839446036\n", "[INFO] Iteration 281\n", "\tAlpha-Pass\n", "\tBeta-Pass\n", "\tDi-Gamma and Gamma Computation (Expectations)\n", "\tReestimating HMM paramseters (Maximizing Expectations)\n", "\tlog(P(O|lambda)) = -329.5610266470442\n", "[INFO] Iteration 282\n", "\tAlpha-Pass\n", "\tBeta-Pass\n", "\tDi-Gamma and Gamma Computation (Expectations)\n", "\tReestimating HMM paramseters (Maximizing Expectations)\n", "\tlog(P(O|lambda)) = -329.5597265119155\n", "[INFO] Iteration 283\n", "\tAlpha-Pass\n", "\tBeta-Pass\n", "\tDi-Gamma and Gamma Computation (Expectations)\n", "\tReestimating HMM paramseters (Maximizing Expectations)\n", "\tlog(P(O|lambda)) = -329.5584166037697\n", "[INFO] Iteration 284\n", "\tAlpha-Pass\n", "\tBeta-Pass\n", "\tDi-Gamma and Gamma Computation (Expectations)\n", "\tReestimating HMM paramseters (Maximizing Expectations)\n", "\tlog(P(O|lambda)) = -329.5570957411707\n", "[INFO] Iteration 285\n", "\tAlpha-Pass\n", "\tBeta-Pass\n", "\tDi-Gamma and Gamma Computation (Expectations)\n", "\tReestimating HMM paramseters (Maximizing Expectations)\n", "\tlog(P(O|lambda)) = -329.55576291168467\n", "[INFO] Iteration 286\n", "\tAlpha-Pass\n", "\tBeta-Pass\n", "\tDi-Gamma and Gamma Computation (Expectations)\n", "\tReestimating HMM paramseters (Maximizing Expectations)\n", "\tlog(P(O|lambda)) = -329.55441724282764\n", "[INFO] Iteration 287\n", "\tAlpha-Pass\n", "\tBeta-Pass\n", "\tDi-Gamma and Gamma Computation (Expectations)\n", "\tReestimating HMM paramseters (Maximizing Expectations)\n", "\tlog(P(O|lambda)) = -329.5530579779111\n", "[INFO] Iteration 288\n", "\tAlpha-Pass\n", "\tBeta-Pass\n", "\tDi-Gamma and Gamma Computation (Expectations)\n", "\tReestimating HMM paramseters (Maximizing Expectations)\n", "\tlog(P(O|lambda)) = -329.55168445594876\n", "[INFO] Iteration 289\n", "\tAlpha-Pass\n", "\tBeta-Pass\n", "\tDi-Gamma and Gamma Computation (Expectations)\n", "\tReestimating HMM paramseters (Maximizing Expectations)\n", "\tlog(P(O|lambda)) = -329.5502960949285\n", "[INFO] Iteration 290\n", "\tAlpha-Pass\n", "\tBeta-Pass\n", "\tDi-Gamma and Gamma Computation (Expectations)\n", "\tReestimating HMM paramseters (Maximizing Expectations)\n", "\tlog(P(O|lambda)) = -329.5488923779346\n", "[INFO] Iteration 291\n", "\tAlpha-Pass\n", "\tBeta-Pass\n", "\tDi-Gamma and Gamma Computation (Expectations)\n", "\tReestimating HMM paramseters (Maximizing Expectations)\n", "\tlog(P(O|lambda)) = -329.5474728415862\n", "[INFO] Iteration 292\n", "\tAlpha-Pass\n", "\tBeta-Pass\n", "\tDi-Gamma and Gamma Computation (Expectations)\n", "\tReestimating HMM paramseters (Maximizing Expectations)\n", "\tlog(P(O|lambda)) = -329.5460370664527\n", "[INFO] Iteration 293\n", "\tAlpha-Pass\n", "\tBeta-Pass\n", "\tDi-Gamma and Gamma Computation (Expectations)\n", "\tReestimating HMM paramseters (Maximizing Expectations)\n", "\tlog(P(O|lambda)) = -329.5445846690784\n", "[INFO] Iteration 294\n", "\tAlpha-Pass\n", "\tBeta-Pass\n", "\tDi-Gamma and Gamma Computation (Expectations)\n", "\tReestimating HMM paramseters (Maximizing Expectations)\n", "\tlog(P(O|lambda)) = -329.54311529535244\n", "[INFO] Iteration 295\n", "\tAlpha-Pass\n", "\tBeta-Pass\n", "\tDi-Gamma and Gamma Computation (Expectations)\n", "\tReestimating HMM paramseters (Maximizing Expectations)\n", "\tlog(P(O|lambda)) = -329.5416286150039\n", "[INFO] Iteration 296\n", "\tAlpha-Pass\n", "\tBeta-Pass\n", "\tDi-Gamma and Gamma Computation (Expectations)\n", "\tReestimating HMM paramseters (Maximizing Expectations)\n", "\tlog(P(O|lambda)) = -329.5401243170248\n", "[INFO] Iteration 297\n", "\tAlpha-Pass\n", "\tBeta-Pass\n", "\tDi-Gamma and Gamma Computation (Expectations)\n", "\tReestimating HMM paramseters (Maximizing Expectations)\n", "\tlog(P(O|lambda)) = -329.5386021058719\n", "[INFO] Iteration 298\n", "\tAlpha-Pass\n", "\tBeta-Pass\n", "\tDi-Gamma and Gamma Computation (Expectations)\n", "\tReestimating HMM paramseters (Maximizing Expectations)\n", "\tlog(P(O|lambda)) = -329.53706169828746\n", "[INFO] Iteration 299\n", "\tAlpha-Pass\n", "\tBeta-Pass\n", "\tDi-Gamma and Gamma Computation (Expectations)\n", "\tReestimating HMM paramseters (Maximizing Expectations)\n", "\tlog(P(O|lambda)) = -329.5355028206731\n", "[INFO] Iteration 300\n", "\tAlpha-Pass\n", "\tBeta-Pass\n", "\tDi-Gamma and Gamma Computation (Expectations)\n", "\tReestimating HMM paramseters (Maximizing Expectations)\n", "\tlog(P(O|lambda)) = -329.53392520690005\n", "[INFO] Iteration 301\n", "\tAlpha-Pass\n", "\tBeta-Pass\n", "\tDi-Gamma and Gamma Computation (Expectations)\n", "\tReestimating HMM paramseters (Maximizing Expectations)\n", "\tlog(P(O|lambda)) = -329.53232859647574\n", "[INFO] Iteration 302\n", "\tAlpha-Pass\n", "\tBeta-Pass\n" ] }, { "name": "stdout", "output_type": "stream", "text": [ "\tDi-Gamma and Gamma Computation (Expectations)\n", "\tReestimating HMM paramseters (Maximizing Expectations)\n", "\tlog(P(O|lambda)) = -329.530712733014\n", "[INFO] Iteration 303\n", "\tAlpha-Pass\n", "\tBeta-Pass\n", "\tDi-Gamma and Gamma Computation (Expectations)\n", "\tReestimating HMM paramseters (Maximizing Expectations)\n", "\tlog(P(O|lambda)) = -329.52907736297\n", "[INFO] Iteration 304\n", "\tAlpha-Pass\n", "\tBeta-Pass\n", "\tDi-Gamma and Gamma Computation (Expectations)\n", "\tReestimating HMM paramseters (Maximizing Expectations)\n", "\tlog(P(O|lambda)) = -329.5274222345631\n", "[INFO] Iteration 305\n", "\tAlpha-Pass\n", "\tBeta-Pass\n", "\tDi-Gamma and Gamma Computation (Expectations)\n", "\tReestimating HMM paramseters (Maximizing Expectations)\n", "\tlog(P(O|lambda)) = -329.52574709689526\n", "[INFO] Iteration 306\n", "\tAlpha-Pass\n", "\tBeta-Pass\n", "\tDi-Gamma and Gamma Computation (Expectations)\n", "\tReestimating HMM paramseters (Maximizing Expectations)\n", "\tlog(P(O|lambda)) = -329.5240516991855\n", "[INFO] Iteration 307\n", "\tAlpha-Pass\n", "\tBeta-Pass\n", "\tDi-Gamma and Gamma Computation (Expectations)\n", "\tReestimating HMM paramseters (Maximizing Expectations)\n", "\tlog(P(O|lambda)) = -329.52233579014745\n", "[INFO] Iteration 308\n", "\tAlpha-Pass\n", "\tBeta-Pass\n", "\tDi-Gamma and Gamma Computation (Expectations)\n", "\tReestimating HMM paramseters (Maximizing Expectations)\n", "\tlog(P(O|lambda)) = -329.52059911744954\n", "[INFO] Iteration 309\n", "\tAlpha-Pass\n", "\tBeta-Pass\n", "\tDi-Gamma and Gamma Computation (Expectations)\n", "\tReestimating HMM paramseters (Maximizing Expectations)\n", "\tlog(P(O|lambda)) = -329.5188414272697\n", "[INFO] Iteration 310\n", "\tAlpha-Pass\n", "\tBeta-Pass\n", "\tDi-Gamma and Gamma Computation (Expectations)\n", "\tReestimating HMM paramseters (Maximizing Expectations)\n", "\tlog(P(O|lambda)) = -329.5170624638985\n", "[INFO] Iteration 311\n", "\tAlpha-Pass\n", "\tBeta-Pass\n", "\tDi-Gamma and Gamma Computation (Expectations)\n", "\tReestimating HMM paramseters (Maximizing Expectations)\n", "\tlog(P(O|lambda)) = -329.5152619694163\n", "[INFO] Iteration 312\n", "\tAlpha-Pass\n", "\tBeta-Pass\n", "\tDi-Gamma and Gamma Computation (Expectations)\n", "\tReestimating HMM paramseters (Maximizing Expectations)\n", "\tlog(P(O|lambda)) = -329.51343968341183\n", "[INFO] Iteration 313\n", "\tAlpha-Pass\n", "\tBeta-Pass\n", "\tDi-Gamma and Gamma Computation (Expectations)\n", "\tReestimating HMM paramseters (Maximizing Expectations)\n", "\tlog(P(O|lambda)) = -329.5115953427319\n", "[INFO] Iteration 314\n", "\tAlpha-Pass\n", "\tBeta-Pass\n", "\tDi-Gamma and Gamma Computation (Expectations)\n", "\tReestimating HMM paramseters (Maximizing Expectations)\n", "\tlog(P(O|lambda)) = -329.5097286812825\n", "[INFO] Iteration 315\n", "\tAlpha-Pass\n", "\tBeta-Pass\n", "\tDi-Gamma and Gamma Computation (Expectations)\n", "\tReestimating HMM paramseters (Maximizing Expectations)\n", "\tlog(P(O|lambda)) = -329.50783942983173\n", "[INFO] Iteration 316\n", "\tAlpha-Pass\n", "\tBeta-Pass\n", "\tDi-Gamma and Gamma Computation (Expectations)\n", "\tReestimating HMM paramseters (Maximizing Expectations)\n", "\tlog(P(O|lambda)) = -329.50592731584874\n", "[INFO] Iteration 317\n", "\tAlpha-Pass\n", "\tBeta-Pass\n", "\tDi-Gamma and Gamma Computation (Expectations)\n", "\tReestimating HMM paramseters (Maximizing Expectations)\n", "\tlog(P(O|lambda)) = -329.5039920633731\n", "[INFO] Iteration 318\n", "\tAlpha-Pass\n", "\tBeta-Pass\n", "\tDi-Gamma and Gamma Computation (Expectations)\n", "\tReestimating HMM paramseters (Maximizing Expectations)\n", "\tlog(P(O|lambda)) = -329.50203339287475\n", "[INFO] Iteration 319\n", "\tAlpha-Pass\n", "\tBeta-Pass\n", "\tDi-Gamma and Gamma Computation (Expectations)\n", "\tReestimating HMM paramseters (Maximizing Expectations)\n", "\tlog(P(O|lambda)) = -329.5000510211475\n", "[INFO] Iteration 320\n", "\tAlpha-Pass\n", "\tBeta-Pass\n", "\tDi-Gamma and Gamma Computation (Expectations)\n", "\tReestimating HMM paramseters (Maximizing Expectations)\n", "\tlog(P(O|lambda)) = -329.49804466122083\n", "[INFO] Iteration 321\n", "\tAlpha-Pass\n", "\tBeta-Pass\n", "\tDi-Gamma and Gamma Computation (Expectations)\n", "\tReestimating HMM paramseters (Maximizing Expectations)\n", "\tlog(P(O|lambda)) = -329.4960140222402\n", "[INFO] Iteration 322\n", "\tAlpha-Pass\n", "\tBeta-Pass\n", "\tDi-Gamma and Gamma Computation (Expectations)\n", "\tReestimating HMM paramseters (Maximizing Expectations)\n", "\tlog(P(O|lambda)) = -329.49395880941444\n", "[INFO] Iteration 323\n", "\tAlpha-Pass\n", "\tBeta-Pass\n", "\tDi-Gamma and Gamma Computation (Expectations)\n", "\tReestimating HMM paramseters (Maximizing Expectations)\n", "\tlog(P(O|lambda)) = -329.49187872393037\n", "[INFO] Iteration 324\n", "\tAlpha-Pass\n", "\tBeta-Pass\n", "\tDi-Gamma and Gamma Computation (Expectations)\n", "\tReestimating HMM paramseters (Maximizing Expectations)\n", "\tlog(P(O|lambda)) = -329.48977346288314\n", "[INFO] Iteration 325\n", "\tAlpha-Pass\n", "\tBeta-Pass\n", "\tDi-Gamma and Gamma Computation (Expectations)\n", "\tReestimating HMM paramseters (Maximizing Expectations)\n", "\tlog(P(O|lambda)) = -329.48764271923073\n", "[INFO] Iteration 326\n", "\tAlpha-Pass\n", "\tBeta-Pass\n", "\tDi-Gamma and Gamma Computation (Expectations)\n", "\tReestimating HMM paramseters (Maximizing Expectations)\n", "\tlog(P(O|lambda)) = -329.48548618173356\n", "[INFO] Iteration 327\n", "\tAlpha-Pass\n", "\tBeta-Pass\n", "\tDi-Gamma and Gamma Computation (Expectations)\n", "\tReestimating HMM paramseters (Maximizing Expectations)\n", "\tlog(P(O|lambda)) = -329.48330353490337\n", "[INFO] Iteration 328\n", "\tAlpha-Pass\n", "\tBeta-Pass\n", "\tDi-Gamma and Gamma Computation (Expectations)\n", "\tReestimating HMM paramseters (Maximizing Expectations)\n", "\tlog(P(O|lambda)) = -329.48109445898\n", "[INFO] Iteration 329\n", "\tAlpha-Pass\n", "\tBeta-Pass\n", "\tDi-Gamma and Gamma Computation (Expectations)\n", "\tReestimating HMM paramseters (Maximizing Expectations)\n", "\tlog(P(O|lambda)) = -329.47885862987516\n", "[INFO] Iteration 330\n", "\tAlpha-Pass\n", "\tBeta-Pass\n", "\tDi-Gamma and Gamma Computation (Expectations)\n", "\tReestimating HMM paramseters (Maximizing Expectations)\n", "\tlog(P(O|lambda)) = -329.47659571916165\n", "[INFO] Iteration 331\n", "\tAlpha-Pass\n", "\tBeta-Pass\n", "\tDi-Gamma and Gamma Computation (Expectations)\n", "\tReestimating HMM paramseters (Maximizing Expectations)\n", "\tlog(P(O|lambda)) = -329.47430539404263\n", "[INFO] Iteration 332\n", "\tAlpha-Pass\n", "\tBeta-Pass\n", "\tDi-Gamma and Gamma Computation (Expectations)\n", "\tReestimating HMM paramseters (Maximizing Expectations)\n", "\tlog(P(O|lambda)) = -329.4719873173383\n", "[INFO] Iteration 333\n", "\tAlpha-Pass\n", "\tBeta-Pass\n", "\tDi-Gamma and Gamma Computation (Expectations)\n", "\tReestimating HMM paramseters (Maximizing Expectations)\n", "\tlog(P(O|lambda)) = -329.4696411474801\n", "[INFO] Iteration 334\n", "\tAlpha-Pass\n", "\tBeta-Pass\n", "\tDi-Gamma and Gamma Computation (Expectations)\n", "\tReestimating HMM paramseters (Maximizing Expectations)\n", "\tlog(P(O|lambda)) = -329.4672665384935\n", "[INFO] Iteration 335\n", "\tAlpha-Pass\n", "\tBeta-Pass\n", "\tDi-Gamma and Gamma Computation (Expectations)\n", "\tReestimating HMM paramseters (Maximizing Expectations)\n", "\tlog(P(O|lambda)) = -329.4648631400223\n", "[INFO] Iteration 336\n", "\tAlpha-Pass\n", "\tBeta-Pass\n", "\tDi-Gamma and Gamma Computation (Expectations)\n", "\tReestimating HMM paramseters (Maximizing Expectations)\n", "\tlog(P(O|lambda)) = -329.46243059732\n", "[INFO] Iteration 337\n", "\tAlpha-Pass\n", "\tBeta-Pass\n", "\tDi-Gamma and Gamma Computation (Expectations)\n", "\tReestimating HMM paramseters (Maximizing Expectations)\n", "\tlog(P(O|lambda)) = -329.4599685512822\n", "[INFO] Iteration 338\n", "\tAlpha-Pass\n", "\tBeta-Pass\n", "\tDi-Gamma and Gamma Computation (Expectations)\n", "\tReestimating HMM paramseters (Maximizing Expectations)\n", "\tlog(P(O|lambda)) = -329.4574766384647\n", "[INFO] Iteration 339\n", "\tAlpha-Pass\n", "\tBeta-Pass\n", "\tDi-Gamma and Gamma Computation (Expectations)\n", "\tReestimating HMM paramseters (Maximizing Expectations)\n", "\tlog(P(O|lambda)) = -329.45495449112514\n", "[INFO] Iteration 340\n", "\tAlpha-Pass\n", "\tBeta-Pass\n", "\tDi-Gamma and Gamma Computation (Expectations)\n", "\tReestimating HMM paramseters (Maximizing Expectations)\n", "\tlog(P(O|lambda)) = -329.4524017372566\n", "[INFO] Iteration 341\n", "\tAlpha-Pass\n", "\tBeta-Pass\n", "\tDi-Gamma and Gamma Computation (Expectations)\n", "\tReestimating HMM paramseters (Maximizing Expectations)\n", "\tlog(P(O|lambda)) = -329.44981800065375\n", "[INFO] Iteration 342\n", "\tAlpha-Pass\n", "\tBeta-Pass\n", "\tDi-Gamma and Gamma Computation (Expectations)\n", "\tReestimating HMM paramseters (Maximizing Expectations)\n", "\tlog(P(O|lambda)) = -329.4472029009646\n", "[INFO] Iteration 343\n", "\tAlpha-Pass\n", "\tBeta-Pass\n", "\tDi-Gamma and Gamma Computation (Expectations)\n", "\tReestimating HMM paramseters (Maximizing Expectations)\n", "\tlog(P(O|lambda)) = -329.4445560537652\n", "[INFO] Iteration 344\n", "\tAlpha-Pass\n", "\tBeta-Pass\n", "\tDi-Gamma and Gamma Computation (Expectations)\n", "\tReestimating HMM paramseters (Maximizing Expectations)\n", "\tlog(P(O|lambda)) = -329.44187707065447\n", "[INFO] Iteration 345\n", "\tAlpha-Pass\n", "\tBeta-Pass\n", "\tDi-Gamma and Gamma Computation (Expectations)\n", "\tReestimating HMM paramseters (Maximizing Expectations)\n", "\tlog(P(O|lambda)) = -329.4391655593349\n", "[INFO] Iteration 346\n", "\tAlpha-Pass\n", "\tBeta-Pass\n", "\tDi-Gamma and Gamma Computation (Expectations)\n", "\tReestimating HMM paramseters (Maximizing Expectations)\n", "\tlog(P(O|lambda)) = -329.43642112373004\n", "[INFO] Iteration 347\n", "\tAlpha-Pass\n", "\tBeta-Pass\n", "\tDi-Gamma and Gamma Computation (Expectations)\n", "\tReestimating HMM paramseters (Maximizing Expectations)\n", "\tlog(P(O|lambda)) = -329.4336433641011\n", "[INFO] Iteration 348\n", "\tAlpha-Pass\n", "\tBeta-Pass\n", "\tDi-Gamma and Gamma Computation (Expectations)\n", "\tReestimating HMM paramseters (Maximizing Expectations)\n", "\tlog(P(O|lambda)) = -329.4308318771777\n", "[INFO] Iteration 349\n", "\tAlpha-Pass\n", "\tBeta-Pass\n", "\tDi-Gamma and Gamma Computation (Expectations)\n", "\tReestimating HMM paramseters (Maximizing Expectations)\n", "\tlog(P(O|lambda)) = -329.4279862563164\n", "[INFO] Iteration 350\n", "\tAlpha-Pass\n", "\tBeta-Pass\n" ] }, { "name": "stdout", "output_type": "stream", "text": [ "\tDi-Gamma and Gamma Computation (Expectations)\n", "\tReestimating HMM paramseters (Maximizing Expectations)\n", "\tlog(P(O|lambda)) = -329.4251060916495\n", "[INFO] Iteration 351\n", "\tAlpha-Pass\n", "\tBeta-Pass\n", "\tDi-Gamma and Gamma Computation (Expectations)\n", "\tReestimating HMM paramseters (Maximizing Expectations)\n", "\tlog(P(O|lambda)) = -329.4221909702728\n", "[INFO] Iteration 352\n", "\tAlpha-Pass\n", "\tBeta-Pass\n", "\tDi-Gamma and Gamma Computation (Expectations)\n", "\tReestimating HMM paramseters (Maximizing Expectations)\n", "\tlog(P(O|lambda)) = -329.41924047643585\n", "[INFO] Iteration 353\n", "\tAlpha-Pass\n", "\tBeta-Pass\n", "\tDi-Gamma and Gamma Computation (Expectations)\n", "\tReestimating HMM paramseters (Maximizing Expectations)\n", "\tlog(P(O|lambda)) = -329.4162541917544\n", "[INFO] Iteration 354\n", "\tAlpha-Pass\n", "\tBeta-Pass\n", "\tDi-Gamma and Gamma Computation (Expectations)\n", "\tReestimating HMM paramseters (Maximizing Expectations)\n", "\tlog(P(O|lambda)) = -329.41323169543443\n", "[INFO] Iteration 355\n", "\tAlpha-Pass\n", "\tBeta-Pass\n", "\tDi-Gamma and Gamma Computation (Expectations)\n", "\tReestimating HMM paramseters (Maximizing Expectations)\n", "\tlog(P(O|lambda)) = -329.4101725645271\n", "[INFO] Iteration 356\n", "\tAlpha-Pass\n", "\tBeta-Pass\n", "\tDi-Gamma and Gamma Computation (Expectations)\n", "\tReestimating HMM paramseters (Maximizing Expectations)\n", "\tlog(P(O|lambda)) = -329.40707637418717\n", "[INFO] Iteration 357\n", "\tAlpha-Pass\n", "\tBeta-Pass\n", "\tDi-Gamma and Gamma Computation (Expectations)\n", "\tReestimating HMM paramseters (Maximizing Expectations)\n", "\tlog(P(O|lambda)) = -329.40394269796616\n", "[INFO] Iteration 358\n", "\tAlpha-Pass\n", "\tBeta-Pass\n", "\tDi-Gamma and Gamma Computation (Expectations)\n", "\tReestimating HMM paramseters (Maximizing Expectations)\n", "\tlog(P(O|lambda)) = -329.40077110811296\n", "[INFO] Iteration 359\n", "\tAlpha-Pass\n", "\tBeta-Pass\n", "\tDi-Gamma and Gamma Computation (Expectations)\n", "\tReestimating HMM paramseters (Maximizing Expectations)\n", "\tlog(P(O|lambda)) = -329.3975611759158\n", "[INFO] Iteration 360\n", "\tAlpha-Pass\n", "\tBeta-Pass\n", "\tDi-Gamma and Gamma Computation (Expectations)\n", "\tReestimating HMM paramseters (Maximizing Expectations)\n", "\tlog(P(O|lambda)) = -329.39431247203873\n", "[INFO] Iteration 361\n", "\tAlpha-Pass\n", "\tBeta-Pass\n", "\tDi-Gamma and Gamma Computation (Expectations)\n", "\tReestimating HMM paramseters (Maximizing Expectations)\n", "\tlog(P(O|lambda)) = -329.3910245669022\n", "[INFO] Iteration 362\n", "\tAlpha-Pass\n", "\tBeta-Pass\n", "\tDi-Gamma and Gamma Computation (Expectations)\n", "\tReestimating HMM paramseters (Maximizing Expectations)\n", "\tlog(P(O|lambda)) = -329.3876970310894\n", "[INFO] Iteration 363\n", "\tAlpha-Pass\n", "\tBeta-Pass\n", "\tDi-Gamma and Gamma Computation (Expectations)\n", "\tReestimating HMM paramseters (Maximizing Expectations)\n", "\tlog(P(O|lambda)) = -329.3843294357684\n", "[INFO] Iteration 364\n", "\tAlpha-Pass\n", "\tBeta-Pass\n", "\tDi-Gamma and Gamma Computation (Expectations)\n", "\tReestimating HMM paramseters (Maximizing Expectations)\n", "\tlog(P(O|lambda)) = -329.38092135314605\n", "[INFO] Iteration 365\n", "\tAlpha-Pass\n", "\tBeta-Pass\n", "\tDi-Gamma and Gamma Computation (Expectations)\n", "\tReestimating HMM paramseters (Maximizing Expectations)\n", "\tlog(P(O|lambda)) = -329.37747235693564\n", "[INFO] Iteration 366\n", "\tAlpha-Pass\n", "\tBeta-Pass\n", "\tDi-Gamma and Gamma Computation (Expectations)\n", "\tReestimating HMM paramseters (Maximizing Expectations)\n", "\tlog(P(O|lambda)) = -329.37398202288495\n", "[INFO] Iteration 367\n", "\tAlpha-Pass\n", "\tBeta-Pass\n", "\tDi-Gamma and Gamma Computation (Expectations)\n", "\tReestimating HMM paramseters (Maximizing Expectations)\n", "\tlog(P(O|lambda)) = -329.3704499292994\n", "[INFO] Iteration 368\n", "\tAlpha-Pass\n", "\tBeta-Pass\n", "\tDi-Gamma and Gamma Computation (Expectations)\n", "\tReestimating HMM paramseters (Maximizing Expectations)\n", "\tlog(P(O|lambda)) = -329.3668756576152\n", "[INFO] Iteration 369\n", "\tAlpha-Pass\n", "\tBeta-Pass\n", "\tDi-Gamma and Gamma Computation (Expectations)\n", "\tReestimating HMM paramseters (Maximizing Expectations)\n", "\tlog(P(O|lambda)) = -329.3632587929924\n", "[INFO] Iteration 370\n", "\tAlpha-Pass\n", "\tBeta-Pass\n", "\tDi-Gamma and Gamma Computation (Expectations)\n", "\tReestimating HMM paramseters (Maximizing Expectations)\n", "\tlog(P(O|lambda)) = -329.359598924958\n", "[INFO] Iteration 371\n", "\tAlpha-Pass\n", "\tBeta-Pass\n", "\tDi-Gamma and Gamma Computation (Expectations)\n", "\tReestimating HMM paramseters (Maximizing Expectations)\n", "\tlog(P(O|lambda)) = -329.3558956480545\n", "[INFO] Iteration 372\n", "\tAlpha-Pass\n", "\tBeta-Pass\n", "\tDi-Gamma and Gamma Computation (Expectations)\n", "\tReestimating HMM paramseters (Maximizing Expectations)\n", "\tlog(P(O|lambda)) = -329.35214856256175\n", "[INFO] Iteration 373\n", "\tAlpha-Pass\n", "\tBeta-Pass\n", "\tDi-Gamma and Gamma Computation (Expectations)\n", "\tReestimating HMM paramseters (Maximizing Expectations)\n", "\tlog(P(O|lambda)) = -329.3483572752047\n", "[INFO] Iteration 374\n", "\tAlpha-Pass\n", "\tBeta-Pass\n", "\tDi-Gamma and Gamma Computation (Expectations)\n", "\tReestimating HMM paramseters (Maximizing Expectations)\n", "\tlog(P(O|lambda)) = -329.3445213999486\n", "[INFO] Iteration 375\n", "\tAlpha-Pass\n", "\tBeta-Pass\n", "\tDi-Gamma and Gamma Computation (Expectations)\n", "\tReestimating HMM paramseters (Maximizing Expectations)\n", "\tlog(P(O|lambda)) = -329.3406405587917\n", "[INFO] Iteration 376\n", "\tAlpha-Pass\n", "\tBeta-Pass\n", "\tDi-Gamma and Gamma Computation (Expectations)\n", "\tReestimating HMM paramseters (Maximizing Expectations)\n", "\tlog(P(O|lambda)) = -329.3367143826183\n", "[INFO] Iteration 377\n", "\tAlpha-Pass\n", "\tBeta-Pass\n", "\tDi-Gamma and Gamma Computation (Expectations)\n", "\tReestimating HMM paramseters (Maximizing Expectations)\n", "\tlog(P(O|lambda)) = -329.3327425120854\n", "[INFO] Iteration 378\n", "\tAlpha-Pass\n", "\tBeta-Pass\n", "\tDi-Gamma and Gamma Computation (Expectations)\n", "\tReestimating HMM paramseters (Maximizing Expectations)\n", "\tlog(P(O|lambda)) = -329.3287245985489\n", "[INFO] Iteration 379\n", "\tAlpha-Pass\n", "\tBeta-Pass\n", "\tDi-Gamma and Gamma Computation (Expectations)\n", "\tReestimating HMM paramseters (Maximizing Expectations)\n", "\tlog(P(O|lambda)) = -329.32466030502917\n", "[INFO] Iteration 380\n", "\tAlpha-Pass\n", "\tBeta-Pass\n", "\tDi-Gamma and Gamma Computation (Expectations)\n", "\tReestimating HMM paramseters (Maximizing Expectations)\n", "\tlog(P(O|lambda)) = -329.32054930722273\n", "[INFO] Iteration 381\n", "\tAlpha-Pass\n", "\tBeta-Pass\n", "\tDi-Gamma and Gamma Computation (Expectations)\n", "\tReestimating HMM paramseters (Maximizing Expectations)\n", "\tlog(P(O|lambda)) = -329.31639129454965\n", "[INFO] Iteration 382\n", "\tAlpha-Pass\n", "\tBeta-Pass\n", "\tDi-Gamma and Gamma Computation (Expectations)\n", "\tReestimating HMM paramseters (Maximizing Expectations)\n", "\tlog(P(O|lambda)) = -329.31218597125786\n", "[INFO] Iteration 383\n", "\tAlpha-Pass\n", "\tBeta-Pass\n", "\tDi-Gamma and Gamma Computation (Expectations)\n", "\tReestimating HMM paramseters (Maximizing Expectations)\n", "\tlog(P(O|lambda)) = -329.30793305755475\n", "[INFO] Iteration 384\n", "\tAlpha-Pass\n", "\tBeta-Pass\n", "\tDi-Gamma and Gamma Computation (Expectations)\n", "\tReestimating HMM paramseters (Maximizing Expectations)\n", "\tlog(P(O|lambda)) = -329.3036322907939\n", "[INFO] Iteration 385\n", "\tAlpha-Pass\n", "\tBeta-Pass\n", "\tDi-Gamma and Gamma Computation (Expectations)\n", "\tReestimating HMM paramseters (Maximizing Expectations)\n", "\tlog(P(O|lambda)) = -329.2992834267043\n", "[INFO] Iteration 386\n", "\tAlpha-Pass\n", "\tBeta-Pass\n", "\tDi-Gamma and Gamma Computation (Expectations)\n", "\tReestimating HMM paramseters (Maximizing Expectations)\n", "\tlog(P(O|lambda)) = -329.2948862406707\n", "[INFO] Iteration 387\n", "\tAlpha-Pass\n", "\tBeta-Pass\n", "\tDi-Gamma and Gamma Computation (Expectations)\n", "\tReestimating HMM paramseters (Maximizing Expectations)\n", "\tlog(P(O|lambda)) = -329.2904405290443\n", "[INFO] Iteration 388\n", "\tAlpha-Pass\n", "\tBeta-Pass\n", "\tDi-Gamma and Gamma Computation (Expectations)\n", "\tReestimating HMM paramseters (Maximizing Expectations)\n", "\tlog(P(O|lambda)) = -329.2859461105199\n", "[INFO] Iteration 389\n", "\tAlpha-Pass\n", "\tBeta-Pass\n", "\tDi-Gamma and Gamma Computation (Expectations)\n", "\tReestimating HMM paramseters (Maximizing Expectations)\n", "\tlog(P(O|lambda)) = -329.2814028275397\n", "[INFO] Iteration 390\n", "\tAlpha-Pass\n", "\tBeta-Pass\n", "\tDi-Gamma and Gamma Computation (Expectations)\n", "\tReestimating HMM paramseters (Maximizing Expectations)\n", "\tlog(P(O|lambda)) = -329.2768105477519\n", "[INFO] Iteration 391\n", "\tAlpha-Pass\n", "\tBeta-Pass\n", "\tDi-Gamma and Gamma Computation (Expectations)\n", "\tReestimating HMM paramseters (Maximizing Expectations)\n", "\tlog(P(O|lambda)) = -329.272169165521\n", "[INFO] Iteration 392\n", "\tAlpha-Pass\n", "\tBeta-Pass\n", "\tDi-Gamma and Gamma Computation (Expectations)\n", "\tReestimating HMM paramseters (Maximizing Expectations)\n", "\tlog(P(O|lambda)) = -329.26747860347007\n", "[INFO] Iteration 393\n", "\tAlpha-Pass\n", "\tBeta-Pass\n", "\tDi-Gamma and Gamma Computation (Expectations)\n", "\tReestimating HMM paramseters (Maximizing Expectations)\n", "\tlog(P(O|lambda)) = -329.2627388140746\n", "[INFO] Iteration 394\n", "\tAlpha-Pass\n", "\tBeta-Pass\n", "\tDi-Gamma and Gamma Computation (Expectations)\n" ] }, { "name": "stdout", "output_type": "stream", "text": [ "\tReestimating HMM paramseters (Maximizing Expectations)\n", "\tlog(P(O|lambda)) = -329.25794978129113\n", "[INFO] Iteration 395\n", "\tAlpha-Pass\n", "\tBeta-Pass\n", "\tDi-Gamma and Gamma Computation (Expectations)\n", "\tReestimating HMM paramseters (Maximizing Expectations)\n", "\tlog(P(O|lambda)) = -329.2531115222405\n", "[INFO] Iteration 396\n", "\tAlpha-Pass\n", "\tBeta-Pass\n", "\tDi-Gamma and Gamma Computation (Expectations)\n", "\tReestimating HMM paramseters (Maximizing Expectations)\n", "\tlog(P(O|lambda)) = -329.24822408892055\n", "[INFO] Iteration 397\n", "\tAlpha-Pass\n", "\tBeta-Pass\n", "\tDi-Gamma and Gamma Computation (Expectations)\n", "\tReestimating HMM paramseters (Maximizing Expectations)\n", "\tlog(P(O|lambda)) = -329.24328756995436\n", "[INFO] Iteration 398\n", "\tAlpha-Pass\n", "\tBeta-Pass\n", "\tDi-Gamma and Gamma Computation (Expectations)\n", "\tReestimating HMM paramseters (Maximizing Expectations)\n", "\tlog(P(O|lambda)) = -329.2383020923806\n", "[INFO] Iteration 399\n", "\tAlpha-Pass\n", "\tBeta-Pass\n", "\tDi-Gamma and Gamma Computation (Expectations)\n", "\tReestimating HMM paramseters (Maximizing Expectations)\n", "\tlog(P(O|lambda)) = -329.2332678234823\n", "[INFO] Iteration 400\n", "\tAlpha-Pass\n", "\tBeta-Pass\n", "\tDi-Gamma and Gamma Computation (Expectations)\n", "\tReestimating HMM paramseters (Maximizing Expectations)\n", "\tlog(P(O|lambda)) = -329.22818497261613\n", "[INFO] Iteration 401\n", "\tAlpha-Pass\n", "\tBeta-Pass\n", "\tDi-Gamma and Gamma Computation (Expectations)\n", "\tReestimating HMM paramseters (Maximizing Expectations)\n", "\tlog(P(O|lambda)) = -329.22305379311075\n", "[INFO] Iteration 402\n", "\tAlpha-Pass\n", "\tBeta-Pass\n", "\tDi-Gamma and Gamma Computation (Expectations)\n", "\tReestimating HMM paramseters (Maximizing Expectations)\n", "\tlog(P(O|lambda)) = -329.2178745841427\n", "[INFO] Iteration 403\n", "\tAlpha-Pass\n", "\tBeta-Pass\n", "\tDi-Gamma and Gamma Computation (Expectations)\n", "\tReestimating HMM paramseters (Maximizing Expectations)\n", "\tlog(P(O|lambda)) = -329.21264769266367\n", "[INFO] Iteration 404\n", "\tAlpha-Pass\n", "\tBeta-Pass\n", "\tDi-Gamma and Gamma Computation (Expectations)\n", "\tReestimating HMM paramseters (Maximizing Expectations)\n", "\tlog(P(O|lambda)) = -329.20737351532216\n", "[INFO] Iteration 405\n", "\tAlpha-Pass\n", "\tBeta-Pass\n", "\tDi-Gamma and Gamma Computation (Expectations)\n", "\tReestimating HMM paramseters (Maximizing Expectations)\n", "\tlog(P(O|lambda)) = -329.2020525003883\n", "[INFO] Iteration 406\n", "\tAlpha-Pass\n", "\tBeta-Pass\n", "\tDi-Gamma and Gamma Computation (Expectations)\n", "\tReestimating HMM paramseters (Maximizing Expectations)\n", "\tlog(P(O|lambda)) = -329.1966851496889\n", "[INFO] Iteration 407\n", "\tAlpha-Pass\n", "\tBeta-Pass\n", "\tDi-Gamma and Gamma Computation (Expectations)\n", "\tReestimating HMM paramseters (Maximizing Expectations)\n", "\tlog(P(O|lambda)) = -329.1912720205297\n", "[INFO] Iteration 408\n", "\tAlpha-Pass\n", "\tBeta-Pass\n", "\tDi-Gamma and Gamma Computation (Expectations)\n", "\tReestimating HMM paramseters (Maximizing Expectations)\n", "\tlog(P(O|lambda)) = -329.1858137276038\n", "[INFO] Iteration 409\n", "\tAlpha-Pass\n", "\tBeta-Pass\n", "\tDi-Gamma and Gamma Computation (Expectations)\n", "\tReestimating HMM paramseters (Maximizing Expectations)\n", "\tlog(P(O|lambda)) = -329.1803109448715\n", "[INFO] Iteration 410\n", "\tAlpha-Pass\n", "\tBeta-Pass\n", "\tDi-Gamma and Gamma Computation (Expectations)\n", "\tReestimating HMM paramseters (Maximizing Expectations)\n", "\tlog(P(O|lambda)) = -329.17476440741507\n", "[INFO] Iteration 411\n", "\tAlpha-Pass\n", "\tBeta-Pass\n", "\tDi-Gamma and Gamma Computation (Expectations)\n", "\tReestimating HMM paramseters (Maximizing Expectations)\n", "\tlog(P(O|lambda)) = -329.1691749132489\n", "[INFO] Iteration 412\n", "\tAlpha-Pass\n", "\tBeta-Pass\n", "\tDi-Gamma and Gamma Computation (Expectations)\n", "\tReestimating HMM paramseters (Maximizing Expectations)\n", "\tlog(P(O|lambda)) = -329.163543325072\n", "[INFO] Iteration 413\n", "\tAlpha-Pass\n", "\tBeta-Pass\n", "\tDi-Gamma and Gamma Computation (Expectations)\n", "\tReestimating HMM paramseters (Maximizing Expectations)\n", "\tlog(P(O|lambda)) = -329.15787057196763\n", "[INFO] Iteration 414\n", "\tAlpha-Pass\n", "\tBeta-Pass\n", "\tDi-Gamma and Gamma Computation (Expectations)\n", "\tReestimating HMM paramseters (Maximizing Expectations)\n", "\tlog(P(O|lambda)) = -329.1521576510116\n", "[INFO] Iteration 415\n", "\tAlpha-Pass\n", "\tBeta-Pass\n", "\tDi-Gamma and Gamma Computation (Expectations)\n", "\tReestimating HMM paramseters (Maximizing Expectations)\n", "\tlog(P(O|lambda)) = -329.1464056288056\n", "[INFO] Iteration 416\n", "\tAlpha-Pass\n", "\tBeta-Pass\n", "\tDi-Gamma and Gamma Computation (Expectations)\n", "\tReestimating HMM paramseters (Maximizing Expectations)\n", "\tlog(P(O|lambda)) = -329.1406156429066\n", "[INFO] Iteration 417\n", "\tAlpha-Pass\n", "\tBeta-Pass\n", "\tDi-Gamma and Gamma Computation (Expectations)\n", "\tReestimating HMM paramseters (Maximizing Expectations)\n", "\tlog(P(O|lambda)) = -329.1347889031397\n", "[INFO] Iteration 418\n", "\tAlpha-Pass\n", "\tBeta-Pass\n", "\tDi-Gamma and Gamma Computation (Expectations)\n", "\tReestimating HMM paramseters (Maximizing Expectations)\n", "\tlog(P(O|lambda)) = -329.12892669276056\n", "[INFO] Iteration 419\n", "\tAlpha-Pass\n", "\tBeta-Pass\n", "\tDi-Gamma and Gamma Computation (Expectations)\n", "\tReestimating HMM paramseters (Maximizing Expectations)\n", "\tlog(P(O|lambda)) = -329.1230303695212\n", "[INFO] Iteration 420\n", "\tAlpha-Pass\n", "\tBeta-Pass\n", "\tDi-Gamma and Gamma Computation (Expectations)\n", "\tReestimating HMM paramseters (Maximizing Expectations)\n", "\tlog(P(O|lambda)) = -329.11710136651965\n", "[INFO] Iteration 421\n", "\tAlpha-Pass\n", "\tBeta-Pass\n", "\tDi-Gamma and Gamma Computation (Expectations)\n", "\tReestimating HMM paramseters (Maximizing Expectations)\n", "\tlog(P(O|lambda)) = -329.1111411929133\n", "[INFO] Iteration 422\n", "\tAlpha-Pass\n", "\tBeta-Pass\n", "\tDi-Gamma and Gamma Computation (Expectations)\n", "\tReestimating HMM paramseters (Maximizing Expectations)\n", "\tlog(P(O|lambda)) = -329.1051514344078\n", "[INFO] Iteration 423\n", "\tAlpha-Pass\n", "\tBeta-Pass\n", "\tDi-Gamma and Gamma Computation (Expectations)\n", "\tReestimating HMM paramseters (Maximizing Expectations)\n", "\tlog(P(O|lambda)) = -329.09913375356365\n", "[INFO] Iteration 424\n", "\tAlpha-Pass\n", "\tBeta-Pass\n", "\tDi-Gamma and Gamma Computation (Expectations)\n", "\tReestimating HMM paramseters (Maximizing Expectations)\n", "\tlog(P(O|lambda)) = -329.093089889854\n", "[INFO] Iteration 425\n", "\tAlpha-Pass\n", "\tBeta-Pass\n", "\tDi-Gamma and Gamma Computation (Expectations)\n", "\tReestimating HMM paramseters (Maximizing Expectations)\n", "\tlog(P(O|lambda)) = -329.08702165949273\n", "[INFO] Iteration 426\n", "\tAlpha-Pass\n", "\tBeta-Pass\n", "\tDi-Gamma and Gamma Computation (Expectations)\n", "\tReestimating HMM paramseters (Maximizing Expectations)\n", "\tlog(P(O|lambda)) = -329.0809309549874\n", "[INFO] Iteration 427\n", "\tAlpha-Pass\n", "\tBeta-Pass\n", "\tDi-Gamma and Gamma Computation (Expectations)\n", "\tReestimating HMM paramseters (Maximizing Expectations)\n", "\tlog(P(O|lambda)) = -329.07481974441794\n", "[INFO] Iteration 428\n", "\tAlpha-Pass\n", "\tBeta-Pass\n", "\tDi-Gamma and Gamma Computation (Expectations)\n", "\tReestimating HMM paramseters (Maximizing Expectations)\n", "\tlog(P(O|lambda)) = -329.0686900704467\n", "[INFO] Iteration 429\n", "\tAlpha-Pass\n", "\tBeta-Pass\n", "\tDi-Gamma and Gamma Computation (Expectations)\n", "\tReestimating HMM paramseters (Maximizing Expectations)\n", "\tlog(P(O|lambda)) = -329.06254404897754\n", "[INFO] Iteration 430\n", "\tAlpha-Pass\n", "\tBeta-Pass\n", "\tDi-Gamma and Gamma Computation (Expectations)\n", "\tReestimating HMM paramseters (Maximizing Expectations)\n", "\tlog(P(O|lambda)) = -329.05638386752463\n", "[INFO] Iteration 431\n", "\tAlpha-Pass\n", "\tBeta-Pass\n", "\tDi-Gamma and Gamma Computation (Expectations)\n", "\tReestimating HMM paramseters (Maximizing Expectations)\n", "\tlog(P(O|lambda)) = -329.0502117832273\n", "[INFO] Iteration 432\n", "\tAlpha-Pass\n", "\tBeta-Pass\n", "\tDi-Gamma and Gamma Computation (Expectations)\n", "\tReestimating HMM paramseters (Maximizing Expectations)\n", "\tlog(P(O|lambda)) = -329.0440301205319\n", "[INFO] Iteration 433\n", "\tAlpha-Pass\n", "\tBeta-Pass\n", "\tDi-Gamma and Gamma Computation (Expectations)\n", "\tReestimating HMM paramseters (Maximizing Expectations)\n", "\tlog(P(O|lambda)) = -329.03784126849297\n", "[INFO] Iteration 434\n", "\tAlpha-Pass\n", "\tBeta-Pass\n", "\tDi-Gamma and Gamma Computation (Expectations)\n", "\tReestimating HMM paramseters (Maximizing Expectations)\n", "\tlog(P(O|lambda)) = -329.03164767773075\n", "[INFO] Iteration 435\n", "\tAlpha-Pass\n", "\tBeta-Pass\n", "\tDi-Gamma and Gamma Computation (Expectations)\n", "\tReestimating HMM paramseters (Maximizing Expectations)\n", "\tlog(P(O|lambda)) = -329.02545185699046\n", "[INFO] Iteration 436\n", "\tAlpha-Pass\n", "\tBeta-Pass\n", "\tDi-Gamma and Gamma Computation (Expectations)\n", "\tReestimating HMM paramseters (Maximizing Expectations)\n", "\tlog(P(O|lambda)) = -329.01925636934254\n", "[INFO] Iteration 437\n", "\tAlpha-Pass\n", "\tBeta-Pass\n", "\tDi-Gamma and Gamma Computation (Expectations)\n", "\tReestimating HMM paramseters (Maximizing Expectations)\n", "\tlog(P(O|lambda)) = -329.0130638279854\n", "[INFO] Iteration 438\n", "\tAlpha-Pass\n", "\tBeta-Pass\n", "\tDi-Gamma and Gamma Computation (Expectations)\n", "\tReestimating HMM paramseters (Maximizing Expectations)\n", "\tlog(P(O|lambda)) = -329.00687689168177\n", "[INFO] Iteration 439\n", "\tAlpha-Pass\n", "\tBeta-Pass\n", "\tDi-Gamma and Gamma Computation (Expectations)\n", "\tReestimating HMM paramseters (Maximizing Expectations)\n", "\tlog(P(O|lambda)) = -329.0006982598069\n", "[INFO] Iteration 440\n", "\tAlpha-Pass\n", "\tBeta-Pass\n" ] }, { "name": "stdout", "output_type": "stream", "text": [ "\tDi-Gamma and Gamma Computation (Expectations)\n", "\tReestimating HMM paramseters (Maximizing Expectations)\n", "\tlog(P(O|lambda)) = -328.9945306670284\n", "[INFO] Iteration 441\n", "\tAlpha-Pass\n", "\tBeta-Pass\n", "\tDi-Gamma and Gamma Computation (Expectations)\n", "\tReestimating HMM paramseters (Maximizing Expectations)\n", "\tlog(P(O|lambda)) = -328.98837687762756\n", "[INFO] Iteration 442\n", "\tAlpha-Pass\n", "\tBeta-Pass\n", "\tDi-Gamma and Gamma Computation (Expectations)\n", "\tReestimating HMM paramseters (Maximizing Expectations)\n", "\tlog(P(O|lambda)) = -328.9822396794728\n", "[INFO] Iteration 443\n", "\tAlpha-Pass\n", "\tBeta-Pass\n", "\tDi-Gamma and Gamma Computation (Expectations)\n", "\tReestimating HMM paramseters (Maximizing Expectations)\n", "\tlog(P(O|lambda)) = -328.9761218776576\n", "[INFO] Iteration 444\n", "\tAlpha-Pass\n", "\tBeta-Pass\n", "\tDi-Gamma and Gamma Computation (Expectations)\n", "\tReestimating HMM paramseters (Maximizing Expectations)\n", "\tlog(P(O|lambda)) = -328.9700262878294\n", "[INFO] Iteration 445\n", "\tAlpha-Pass\n", "\tBeta-Pass\n", "\tDi-Gamma and Gamma Computation (Expectations)\n", "\tReestimating HMM paramseters (Maximizing Expectations)\n", "\tlog(P(O|lambda)) = -328.9639557292209\n", "[INFO] Iteration 446\n", "\tAlpha-Pass\n", "\tBeta-Pass\n", "\tDi-Gamma and Gamma Computation (Expectations)\n", "\tReestimating HMM paramseters (Maximizing Expectations)\n", "\tlog(P(O|lambda)) = -328.95791301745396\n", "[INFO] Iteration 447\n", "\tAlpha-Pass\n", "\tBeta-Pass\n", "\tDi-Gamma and Gamma Computation (Expectations)\n", "\tReestimating HMM paramseters (Maximizing Expectations)\n", "\tlog(P(O|lambda)) = -328.9519009570644\n", "[INFO] Iteration 448\n", "\tAlpha-Pass\n", "\tBeta-Pass\n", "\tDi-Gamma and Gamma Computation (Expectations)\n", "\tReestimating HMM paramseters (Maximizing Expectations)\n", "\tlog(P(O|lambda)) = -328.94592233386913\n", "[INFO] Iteration 449\n", "\tAlpha-Pass\n", "\tBeta-Pass\n", "\tDi-Gamma and Gamma Computation (Expectations)\n", "\tReestimating HMM paramseters (Maximizing Expectations)\n", "\tlog(P(O|lambda)) = -328.93997990715866\n", "[INFO] Iteration 450\n", "\tAlpha-Pass\n", "\tBeta-Pass\n", "\tDi-Gamma and Gamma Computation (Expectations)\n", "\tReestimating HMM paramseters (Maximizing Expectations)\n", "\tlog(P(O|lambda)) = -328.9340764017765\n", "[INFO] Iteration 451\n", "\tAlpha-Pass\n", "\tBeta-Pass\n", "\tDi-Gamma and Gamma Computation (Expectations)\n", "\tReestimating HMM paramseters (Maximizing Expectations)\n", "\tlog(P(O|lambda)) = -328.9282145001121\n", "[INFO] Iteration 452\n", "\tAlpha-Pass\n", "\tBeta-Pass\n", "\tDi-Gamma and Gamma Computation (Expectations)\n", "\tReestimating HMM paramseters (Maximizing Expectations)\n", "\tlog(P(O|lambda)) = -328.92239683408576\n", "[INFO] Iteration 453\n", "\tAlpha-Pass\n", "\tBeta-Pass\n", "\tDi-Gamma and Gamma Computation (Expectations)\n", "\tReestimating HMM paramseters (Maximizing Expectations)\n", "\tlog(P(O|lambda)) = -328.9166259771285\n", "[INFO] Iteration 454\n", "\tAlpha-Pass\n", "\tBeta-Pass\n", "\tDi-Gamma and Gamma Computation (Expectations)\n", "\tReestimating HMM paramseters (Maximizing Expectations)\n", "\tlog(P(O|lambda)) = -328.91090443625313\n", "[INFO] Iteration 455\n", "\tAlpha-Pass\n", "\tBeta-Pass\n", "\tDi-Gamma and Gamma Computation (Expectations)\n", "\tReestimating HMM paramseters (Maximizing Expectations)\n", "\tlog(P(O|lambda)) = -328.90523464420676\n", "[INFO] Iteration 456\n", "\tAlpha-Pass\n", "\tBeta-Pass\n", "\tDi-Gamma and Gamma Computation (Expectations)\n", "\tReestimating HMM paramseters (Maximizing Expectations)\n", "\tlog(P(O|lambda)) = -328.89961895184337\n", "[INFO] Iteration 457\n", "\tAlpha-Pass\n", "\tBeta-Pass\n", "\tDi-Gamma and Gamma Computation (Expectations)\n", "\tReestimating HMM paramseters (Maximizing Expectations)\n", "\tlog(P(O|lambda)) = -328.8940596206666\n", "[INFO] Iteration 458\n", "\tAlpha-Pass\n", "\tBeta-Pass\n", "\tDi-Gamma and Gamma Computation (Expectations)\n", "\tReestimating HMM paramseters (Maximizing Expectations)\n", "\tlog(P(O|lambda)) = -328.8885588156819\n", "[INFO] Iteration 459\n", "\tAlpha-Pass\n", "\tBeta-Pass\n", "\tDi-Gamma and Gamma Computation (Expectations)\n", "\tReestimating HMM paramseters (Maximizing Expectations)\n", "\tlog(P(O|lambda)) = -328.88311859855213\n", "[INFO] Iteration 460\n", "\tAlpha-Pass\n", "\tBeta-Pass\n", "\tDi-Gamma and Gamma Computation (Expectations)\n", "\tReestimating HMM paramseters (Maximizing Expectations)\n", "\tlog(P(O|lambda)) = -328.8777409211325\n", "[INFO] Iteration 461\n", "\tAlpha-Pass\n", "\tBeta-Pass\n", "\tDi-Gamma and Gamma Computation (Expectations)\n", "\tReestimating HMM paramseters (Maximizing Expectations)\n", "\tlog(P(O|lambda)) = -328.8724276194129\n", "[INFO] Iteration 462\n", "\tAlpha-Pass\n", "\tBeta-Pass\n", "\tDi-Gamma and Gamma Computation (Expectations)\n", "\tReestimating HMM paramseters (Maximizing Expectations)\n", "\tlog(P(O|lambda)) = -328.86718040794443\n", "[INFO] Iteration 463\n", "\tAlpha-Pass\n", "\tBeta-Pass\n", "\tDi-Gamma and Gamma Computation (Expectations)\n", "\tReestimating HMM paramseters (Maximizing Expectations)\n", "\tlog(P(O|lambda)) = -328.8620008747474\n", "[INFO] Iteration 464\n", "\tAlpha-Pass\n", "\tBeta-Pass\n", "\tDi-Gamma and Gamma Computation (Expectations)\n", "\tReestimating HMM paramseters (Maximizing Expectations)\n", "\tlog(P(O|lambda)) = -328.8568904767834\n", "[INFO] Iteration 465\n", "\tAlpha-Pass\n", "\tBeta-Pass\n", "\tDi-Gamma and Gamma Computation (Expectations)\n", "\tReestimating HMM paramseters (Maximizing Expectations)\n", "\tlog(P(O|lambda)) = -328.8518505359788\n", "[INFO] Iteration 466\n", "\tAlpha-Pass\n", "\tBeta-Pass\n", "\tDi-Gamma and Gamma Computation (Expectations)\n", "\tReestimating HMM paramseters (Maximizing Expectations)\n", "\tlog(P(O|lambda)) = -328.84688223588205\n", "[INFO] Iteration 467\n", "\tAlpha-Pass\n", "\tBeta-Pass\n", "\tDi-Gamma and Gamma Computation (Expectations)\n", "\tReestimating HMM paramseters (Maximizing Expectations)\n", "\tlog(P(O|lambda)) = -328.84198661892964\n", "[INFO] Iteration 468\n", "\tAlpha-Pass\n", "\tBeta-Pass\n", "\tDi-Gamma and Gamma Computation (Expectations)\n", "\tReestimating HMM paramseters (Maximizing Expectations)\n", "\tlog(P(O|lambda)) = -328.83716458437124\n", "[INFO] Iteration 469\n", "\tAlpha-Pass\n", "\tBeta-Pass\n", "\tDi-Gamma and Gamma Computation (Expectations)\n", "\tReestimating HMM paramseters (Maximizing Expectations)\n", "\tlog(P(O|lambda)) = -328.8324168868569\n", "[INFO] Iteration 470\n", "\tAlpha-Pass\n", "\tBeta-Pass\n", "\tDi-Gamma and Gamma Computation (Expectations)\n", "\tReestimating HMM paramseters (Maximizing Expectations)\n", "\tlog(P(O|lambda)) = -328.8277441356911\n", "[INFO] Iteration 471\n", "\tAlpha-Pass\n", "\tBeta-Pass\n", "\tDi-Gamma and Gamma Computation (Expectations)\n", "\tReestimating HMM paramseters (Maximizing Expectations)\n", "\tlog(P(O|lambda)) = -328.8231467947764\n", "[INFO] Iteration 472\n", "\tAlpha-Pass\n", "\tBeta-Pass\n", "\tDi-Gamma and Gamma Computation (Expectations)\n", "\tReestimating HMM paramseters (Maximizing Expectations)\n", "\tlog(P(O|lambda)) = -328.8186251832073\n", "[INFO] Iteration 473\n", "\tAlpha-Pass\n", "\tBeta-Pass\n", "\tDi-Gamma and Gamma Computation (Expectations)\n", "\tReestimating HMM paramseters (Maximizing Expectations)\n", "\tlog(P(O|lambda)) = -328.81417947655257\n", "[INFO] Iteration 474\n", "\tAlpha-Pass\n", "\tBeta-Pass\n", "\tDi-Gamma and Gamma Computation (Expectations)\n", "\tReestimating HMM paramseters (Maximizing Expectations)\n", "\tlog(P(O|lambda)) = -328.80980970875333\n", "[INFO] Iteration 475\n", "\tAlpha-Pass\n", "\tBeta-Pass\n", "\tDi-Gamma and Gamma Computation (Expectations)\n", "\tReestimating HMM paramseters (Maximizing Expectations)\n", "\tlog(P(O|lambda)) = -328.8055157746859\n", "[INFO] Iteration 476\n", "\tAlpha-Pass\n", "\tBeta-Pass\n", "\tDi-Gamma and Gamma Computation (Expectations)\n", "\tReestimating HMM paramseters (Maximizing Expectations)\n", "\tlog(P(O|lambda)) = -328.80129743330497\n", "[INFO] Iteration 477\n", "\tAlpha-Pass\n", "\tBeta-Pass\n", "\tDi-Gamma and Gamma Computation (Expectations)\n", "\tReestimating HMM paramseters (Maximizing Expectations)\n", "\tlog(P(O|lambda)) = -328.7971543113784\n", "[INFO] Iteration 478\n", "\tAlpha-Pass\n", "\tBeta-Pass\n", "\tDi-Gamma and Gamma Computation (Expectations)\n", "\tReestimating HMM paramseters (Maximizing Expectations)\n", "\tlog(P(O|lambda)) = -328.7930859077362\n", "[INFO] Iteration 479\n", "\tAlpha-Pass\n", "\tBeta-Pass\n", "\tDi-Gamma and Gamma Computation (Expectations)\n", "\tReestimating HMM paramseters (Maximizing Expectations)\n", "\tlog(P(O|lambda)) = -328.78909159806835\n", "[INFO] Iteration 480\n", "\tAlpha-Pass\n", "\tBeta-Pass\n", "\tDi-Gamma and Gamma Computation (Expectations)\n", "\tReestimating HMM paramseters (Maximizing Expectations)\n", "\tlog(P(O|lambda)) = -328.7851706401323\n", "[INFO] Iteration 481\n", "\tAlpha-Pass\n", "\tBeta-Pass\n", "\tDi-Gamma and Gamma Computation (Expectations)\n", "\tReestimating HMM paramseters (Maximizing Expectations)\n", "\tlog(P(O|lambda)) = -328.7813221794228\n", "[INFO] Iteration 482\n", "\tAlpha-Pass\n", "\tBeta-Pass\n", "\tDi-Gamma and Gamma Computation (Expectations)\n", "\tReestimating HMM paramseters (Maximizing Expectations)\n", "\tlog(P(O|lambda)) = -328.7775452551886\n", "[INFO] Iteration 483\n", "\tAlpha-Pass\n", "\tBeta-Pass\n", "\tDi-Gamma and Gamma Computation (Expectations)\n", "\tReestimating HMM paramseters (Maximizing Expectations)\n", "\tlog(P(O|lambda)) = -328.773838806773\n", "[INFO] Iteration 484\n", "\tAlpha-Pass\n", "\tBeta-Pass\n", "\tDi-Gamma and Gamma Computation (Expectations)\n", "\tReestimating HMM paramseters (Maximizing Expectations)\n", "\tlog(P(O|lambda)) = -328.77020168024876\n", "[INFO] Iteration 485\n", "\tAlpha-Pass\n", "\tBeta-Pass\n", "\tDi-Gamma and Gamma Computation (Expectations)\n", "\tReestimating HMM paramseters (Maximizing Expectations)\n", "\tlog(P(O|lambda)) = -328.7666326352432\n", "[INFO] Iteration 486\n", "\tAlpha-Pass\n", "\tBeta-Pass\n", "\tDi-Gamma and Gamma Computation (Expectations)\n", "\tReestimating HMM paramseters (Maximizing Expectations)\n", "\tlog(P(O|lambda)) = -328.7631303519631\n", "[INFO] Iteration 487\n", "\tAlpha-Pass\n", "\tBeta-Pass\n" ] }, { "name": "stdout", "output_type": "stream", "text": [ "\tDi-Gamma and Gamma Computation (Expectations)\n", "\tReestimating HMM paramseters (Maximizing Expectations)\n", "\tlog(P(O|lambda)) = -328.7596934383268\n", "[INFO] Iteration 488\n", "\tAlpha-Pass\n", "\tBeta-Pass\n", "\tDi-Gamma and Gamma Computation (Expectations)\n", "\tReestimating HMM paramseters (Maximizing Expectations)\n", "\tlog(P(O|lambda)) = -328.75632043716865\n", "[INFO] Iteration 489\n", "\tAlpha-Pass\n", "\tBeta-Pass\n", "\tDi-Gamma and Gamma Computation (Expectations)\n", "\tReestimating HMM paramseters (Maximizing Expectations)\n", "\tlog(P(O|lambda)) = -328.7530098334769\n", "[INFO] Iteration 490\n", "\tAlpha-Pass\n", "\tBeta-Pass\n", "\tDi-Gamma and Gamma Computation (Expectations)\n", "\tReestimating HMM paramseters (Maximizing Expectations)\n", "\tlog(P(O|lambda)) = -328.74976006159153\n", "[INFO] Iteration 491\n", "\tAlpha-Pass\n", "\tBeta-Pass\n", "\tDi-Gamma and Gamma Computation (Expectations)\n", "\tReestimating HMM paramseters (Maximizing Expectations)\n", "\tlog(P(O|lambda)) = -328.74656951235454\n", "[INFO] Iteration 492\n", "\tAlpha-Pass\n", "\tBeta-Pass\n", "\tDi-Gamma and Gamma Computation (Expectations)\n", "\tReestimating HMM paramseters (Maximizing Expectations)\n", "\tlog(P(O|lambda)) = -328.74343654013825\n", "[INFO] Iteration 493\n", "\tAlpha-Pass\n", "\tBeta-Pass\n", "\tDi-Gamma and Gamma Computation (Expectations)\n", "\tReestimating HMM paramseters (Maximizing Expectations)\n", "\tlog(P(O|lambda)) = -328.74035946972657\n", "[INFO] Iteration 494\n", "\tAlpha-Pass\n", "\tBeta-Pass\n", "\tDi-Gamma and Gamma Computation (Expectations)\n", "\tReestimating HMM paramseters (Maximizing Expectations)\n", "\tlog(P(O|lambda)) = -328.7373366030242\n", "[INFO] Iteration 495\n", "\tAlpha-Pass\n", "\tBeta-Pass\n", "\tDi-Gamma and Gamma Computation (Expectations)\n", "\tReestimating HMM paramseters (Maximizing Expectations)\n", "\tlog(P(O|lambda)) = -328.73436622552396\n", "[INFO] Iteration 496\n", "\tAlpha-Pass\n", "\tBeta-Pass\n", "\tDi-Gamma and Gamma Computation (Expectations)\n", "\tReestimating HMM paramseters (Maximizing Expectations)\n", "\tlog(P(O|lambda)) = -328.7314466125644\n", "[INFO] Iteration 497\n", "\tAlpha-Pass\n", "\tBeta-Pass\n", "\tDi-Gamma and Gamma Computation (Expectations)\n", "\tReestimating HMM paramseters (Maximizing Expectations)\n", "\tlog(P(O|lambda)) = -328.7285760352779\n", "[INFO] Iteration 498\n", "\tAlpha-Pass\n", "\tBeta-Pass\n", "\tDi-Gamma and Gamma Computation (Expectations)\n", "\tReestimating HMM paramseters (Maximizing Expectations)\n", "\tlog(P(O|lambda)) = -328.72575276628254\n", "[INFO] Iteration 499\n", "\tAlpha-Pass\n", "\tBeta-Pass\n", "\tDi-Gamma and Gamma Computation (Expectations)\n", "\tReestimating HMM paramseters (Maximizing Expectations)\n", "\tlog(P(O|lambda)) = -328.722975085026\n", "pi\n", "1.633771666205252e-160 1.0000000000000144 0.0\n", "A\n", "0.783948 0.164969 0.051083\n", "0.078141 0.883018 0.03884\n", "0.251164 0.00328 0.745555\n", "B\n", "0.427885 0.572115\n", "0.092946 0.907053\n", "0.865173 0.134826\n" ] } ], "source": [ "filenames_hmm3 = [\"hmm4_01.in\", \"hmm4_02.in\", \"hmm4_03.in\"]\n", "\n", "filename_q_2_5_hmm_3 = filenames_hmm3[2]\n", "\n", "lines = read_in_file(filename=filename_q_2_5_hmm_3)\n", "\n", "_, _, _, emission_sequence = \\\n", " read_input_HMM1(lines=lines, read_A=False, read_B=False, read_pi=False, read_emission_sequence=True)\n", "\n", "print(f\"emission_sequence is {emission_sequence}\")\n", "\n", "max_iters = 500\n", "\n", "hmm_my_init.baum_welch(emission_sequence=emission_sequence, max_iters=max_iters)\n", "\n", "pi_fit, A_fit, B_fit = hmm_my_init.pi, hmm_my_init.A, hmm_my_init.B\n", "\n", "print(\"pi\")\n", "print(' '.join(map(str, pi_fit)))\n", "print(\"A\")\n", "pretty_print_matrix(A=A_fit, round_to=6)\n", "print(\"B\")\n", "pretty_print_matrix(A=B_fit, round_to=6)" ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [] } ], "metadata": { "kernelspec": { "display_name": "hmm", "language": "python", "name": "hmm" }, "language_info": { "codemirror_mode": { "name": "ipython", "version": 3 }, "file_extension": ".py", "mimetype": "text/x-python", "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", "version": "3.8.5" } }, "nbformat": 4, "nbformat_minor": 4 }