def run(self, model, tol=<NUM_LIT>, max_iters=<NUM_LIT>, verbose=True):
orig_err_states = np.seterr(all='<STR_LIT>')<EOL>np.seterr(under='<STR_LIT:ignore>')<EOL>if verbose:<EOL><INDENT>print()<EOL>print("<STR_LIT>")<EOL>print("<STR_LIT>")<EOL><DEDENT>num_iters = <NUM_LIT:0><EOL>err_sum = <NUM_LIT><EOL>time0 = time.time()<EOL>target_err = <NUM_LIT> * tol<EOL>while err_sum > target_err and num_iters < max_iters:<EOL><INDENT>prev_isoform_expression = self.get_allelic_expression().sum(axis=<NUM_LIT:0>)<EOL>prev_isoform_expression *= (<NUM_LIT> / prev_isoform_expression.sum())<EOL>self.update_allelic_expression(model=model)<EOL>curr_isoform_expression = self.get_allelic_expression().sum(axis=<NUM_LIT:0>)<EOL>curr_isoform_expression *= (<NUM_LIT> / curr_isoform_expression.sum())<EOL>err = np.abs(curr_isoform_expression - prev_isoform_expression)<EOL>err_sum = err.sum()<EOL>num_iters += <NUM_LIT:1><EOL>if verbose:<EOL><INDENT>time1 = time.time()<EOL>delmin, s = divmod(int(time1 - time0), <NUM_LIT>)<EOL>h, m = divmod(delmin, <NUM_LIT>)<EOL>print("<STR_LIT>" % (num_iters, h, m, s, err_sum))<EOL><DEDENT><DEDENT>
Runs EM iterations

:param model: Normalization model (1: Gene->Allele->Isoform, 2: Gene->Isoform->Allele, 3: Gene->Isoform*Allele, 4: Gene*Isoform*Allele)
:param tol: Tolerance for termination
:param max_iters: Maximum number of iterations until termination
:param verbose: Display information on how EM is running
:return: Nothing (as it performs in-place operations)