2
반복 횟수를 자동으로 추적 할 수있는 방법이 있습니까? 나는 비교적 비싼 모델로 일하고 있으며 체인 상황을 매번 확인하는 것이 좋을 것입니다.pymc에서 샘플링하는 동안 추적을 플로팅하십시오.
반복 횟수를 자동으로 추적 할 수있는 방법이 있습니까? 나는 비교적 비싼 모델로 일하고 있으며 체인 상황을 매번 확인하는 것이 좋을 것입니다.pymc에서 샘플링하는 동안 추적을 플로팅하십시오.
PyMC 2.3에서는 콘솔 세션에서 isample
을 사용할 수 있습니다 (IPython 노트북에서는 작동하지 않음). 이렇게하면 작업을 일시 중지하거나 배경으로 보낼 수 있습니다. 다음과 같이 표시됩니다.
In [7]: M.isample(20000)
==============
PyMC console
==============
PyMC is now sampling. Use the following commands to query or pause the sampler.
Commands:
i -- index: print current iteration index
p -- pause: interrupt sampling and return to the main console.
Sampling can be resumed later with icontinue().
h -- halt: stop sampling and truncate trace. Sampling cannot be
resumed for this chain.
b -- bg: return to the main console. The sampling will still
run in a background thread. There is a possibility of
malfunction if you interfere with the Sampler's
state or the database during sampling. Use this at your
own risk.
pymc > p
장기간에 확인할 수있는 편리한 방법입니다.