---------------------------------------------------------------------------
UnboundLocalError Traceback (most recent call last)
<ipython-input-1-6af41f3e41eb> in <module>
29
30
---> 31 fitted_model, params = pid.run_mcmc(plot_show = True)
C:\ProgramData\Anaconda3\lib\site-packages\bioscrape\emcee_interface.py in run_mcmc(self, **kwargs)
46 self.initial_conditions = self.M.get_species_dictionary()
47 self.prepare_mcmc(**kwargs)
---> 48 fitted_model, params = self.run_emcee(**kwargs)
49 return fitted_model.M, params
50
C:\ProgramData\Anaconda3\lib\site-packages\bioscrape\emcee_interface.py in run_emcee(self, **kwargs)
221 f.close()
222 print('Successfully completed MCMC parameter identification procedure. Parameter distribution data written to mcmc_results.csv file')
--> 223 fitted_model, params = self.plot_mcmc_results(sampler, plot_show)
224 return fitted_model, params
225
C:\ProgramData\Anaconda3\lib\site-packages\bioscrape\emcee_interface.py in plot_mcmc_results(self, sampler, plot_show)
243 best_p_ind = np.where(n == np.max(n))
244 if np.shape(best_p_ind)[-1] != 1:
--> 245 warnings.warn('Multiple parameter values for {0} found with max distribution, choosing the first one. The results might be misleadig.'.format(params_names[i]))
246 best_p_ind = np.array(best_p_ind[0].tolist()[0])
247 assert len(best_p_ind) == 1
UnboundLocalError: local variable 'params_names' referenced before assignment