ssm.log 2.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152
  1. Traceback (most recent call last):
  2. File "/opt/anaconda3/lib/python3.8/site-packages/jupyter_cache/executors/utils.py", line 51, in single_nb_execution
  3. executenb(
  4. File "/opt/anaconda3/lib/python3.8/site-packages/nbclient/client.py", line 1087, in execute
  5. return NotebookClient(nb=nb, resources=resources, km=km, **kwargs).execute()
  6. File "/opt/anaconda3/lib/python3.8/site-packages/nbclient/util.py", line 74, in wrapped
  7. return just_run(coro(*args, **kwargs))
  8. File "/opt/anaconda3/lib/python3.8/site-packages/nbclient/util.py", line 53, in just_run
  9. return loop.run_until_complete(coro)
  10. File "/opt/anaconda3/lib/python3.8/asyncio/base_events.py", line 616, in run_until_complete
  11. return future.result()
  12. File "/opt/anaconda3/lib/python3.8/site-packages/nbclient/client.py", line 540, in async_execute
  13. await self.async_execute_cell(
  14. File "/opt/anaconda3/lib/python3.8/site-packages/nbclient/client.py", line 832, in async_execute_cell
  15. self._check_raise_for_error(cell, exec_reply)
  16. File "/opt/anaconda3/lib/python3.8/site-packages/nbclient/client.py", line 740, in _check_raise_for_error
  17. raise CellExecutionError.from_cell_and_msg(cell, exec_reply['content'])
  18. nbclient.exceptions.CellExecutionError: An error occurred while executing the following cell:
  19. ------------------
  20. # state transition matrix
  21. A = np.array([
  22. [0.95, 0.05],
  23. [0.10, 0.90]
  24. ])
  25. # observation matrix
  26. B = np.array([
  27. [1/6, 1/6, 1/6, 1/6, 1/6, 1/6], # fair die
  28. [1/10, 1/10, 1/10, 1/10, 1/10, 5/10] # loaded die
  29. ])
  30. pi, _ = normalize(np.array([1, 1]))
  31. pi = np.array(pi)
  32. (nstates, nobs) = np.shape(B)
  33. ------------------
  34. ---------------------------------------------------------------------------
  35. NameError Traceback (most recent call last)
  36. <ipython-input-3-2f308bef5393> in <module>
  37.  11 ])
  38.  12 
  39. ---> 13 pi, _ = normalize(np.array([1, 1]))
  40.  14 pi = np.array(pi)
  41.  15 
  42. NameError: name 'normalize' is not defined
  43. NameError: name 'normalize' is not defined