pymc-devs / pymc-examples

Examples of PyMC models, including a library of Jupyter notebooks.
https://www.pymc.io/projects/examples/en/latest/
MIT License
263 stars 218 forks source link

Rolling Regression warning #505

Closed cgarciga closed 1 year ago

cgarciga commented 1 year ago

Rolling Regression: https://www.pymc.io/projects/examples/en/latest/generalized_linear_models/GLM-rolling-regression.html:

Issue description

When running the notebook with pymc 5.0.2 I obtain the sequence of warnings below after hitting run on the sampler.

Output of the sampler is as expected (alpha and beta charts look pretty much the same). I'm just wondering what this warning means and if there is a way to fix it.

c:\Anaconda3\envs\pymc\lib\site-packages\pymc\logprob\joint_logprob.py:167: UserWarning: Found a random variable that was neither among the observations nor the conditioned variables: [normal_rv{0, (0, 0), floatX, False}.0, normal_rv{0, (0, 0), floatX, False}.out]
  warnings.warn(
c:\Anaconda3\envs\pymc\lib\site-packages\pymc\logprob\joint_logprob.py:167: UserWarning: Found a random variable that was neither among the observations nor the conditioned variables: [normal_rv{0, (0, 0), floatX, False}.0, normal_rv{0, (0, 0), floatX, False}.out]
  warnings.warn(
c:\Anaconda3\envs\pymc\lib\site-packages\pymc\logprob\joint_logprob.py:167: UserWarning: Found a random variable that was neither among the observations nor the conditioned variables: [normal_rv{0, (0, 0), floatX, False}.0, normal_rv{0, (0, 0), floatX, False}.out]
  warnings.warn(
c:\Anaconda3\envs\pymc\lib\site-packages\pymc\logprob\joint_logprob.py:167: UserWarning: Found a random variable that was neither among the observations nor the conditioned variables: [normal_rv{0, (0, 0), floatX, False}.0, normal_rv{0, (0, 0), floatX, False}.out]
  warnings.warn(
Auto-assigning NUTS sampler...
Initializing NUTS using jitter+adapt_diag...
c:\Anaconda3\envs\pymc\lib\site-packages\pymc\logprob\joint_logprob.py:167: UserWarning: Found a random variable that was neither among the observations nor the conditioned variables: [normal_rv{0, (0, 0), floatX, False}.0, normal_rv{0, (0, 0), floatX, False}.out]
  warnings.warn(
c:\Anaconda3\envs\pymc\lib\site-packages\pymc\logprob\joint_logprob.py:167: UserWarning: Found a random variable that was neither among the observations nor the conditioned variables: [normal_rv{0, (0, 0), floatX, False}.0, normal_rv{0, (0, 0), floatX, False}.out]
  warnings.warn(
c:\Anaconda3\envs\pymc\lib\site-packages\pymc\logprob\joint_logprob.py:167: UserWarning: Found a random variable that was neither among the observations nor the conditioned variables: [normal_rv{0, (0, 0), floatX, False}.0, normal_rv{0, (0, 0), floatX, False}.out]
  warnings.warn(
c:\Anaconda3\envs\pymc\lib\site-packages\pymc\logprob\joint_logprob.py:167: UserWarning: Found a random variable that was neither among the observations nor the conditioned variables: [normal_rv{0, (0, 0), floatX, False}.0, normal_rv{0, (0, 0), floatX, False}.out]
  warnings.warn(
c:\Anaconda3\envs\pymc\lib\site-packages\pymc\logprob\joint_logprob.py:167: UserWarning: Found a random variable that was neither among the observations nor the conditioned variables: [normal_rv{0, (0, 0), floatX, False}.0, normal_rv{0, (0, 0), floatX, False}.out]
  warnings.warn(
c:\Anaconda3\envs\pymc\lib\site-packages\pymc\logprob\joint_logprob.py:167: UserWarning: Found a random variable that was neither among the observations nor the conditioned variables: [normal_rv{0, (0, 0), floatX, False}.0, normal_rv{0, (0, 0), floatX, False}.out]
  warnings.warn(
c:\Anaconda3\envs\pymc\lib\site-packages\pymc\logprob\joint_logprob.py:167: UserWarning: Found a random variable that was neither among the observations nor the conditioned variables: [normal_rv{0, (0, 0), floatX, False}.0, normal_rv{0, (0, 0), floatX, False}.out]
  warnings.warn(
c:\Anaconda3\envs\pymc\lib\site-packages\pymc\logprob\joint_logprob.py:167: UserWarning: Found a random variable that was neither among the observations nor the conditioned variables: [normal_rv{0, (0, 0), floatX, False}.0, normal_rv{0, (0, 0), floatX, False}.out]
  warnings.warn(
c:\Anaconda3\envs\pymc\lib\site-packages\pymc\logprob\joint_logprob.py:167: UserWarning: Found a random variable that was neither among the observations nor the conditioned variables: [normal_rv{0, (0, 0), floatX, False}.0, normal_rv{0, (0, 0), floatX, False}.out]
  warnings.warn(
c:\Anaconda3\envs\pymc\lib\site-packages\pymc\logprob\joint_logprob.py:167: UserWarning: Found a random variable that was neither among the observations nor the conditioned variables: [normal_rv{0, (0, 0), floatX, False}.0, normal_rv{0, (0, 0), floatX, False}.out]
  warnings.warn(
c:\Anaconda3\envs\pymc\lib\site-packages\pymc\logprob\joint_logprob.py:167: UserWarning: Found a random variable that was neither among the observations nor the conditioned variables: [normal_rv{0, (0, 0), floatX, False}.0, normal_rv{0, (0, 0), floatX, False}.out]
  warnings.warn(
c:\Anaconda3\envs\pymc\lib\site-packages\pymc\logprob\joint_logprob.py:167: UserWarning: Found a random variable that was neither among the observations nor the conditioned variables: [normal_rv{0, (0, 0), floatX, False}.0, normal_rv{0, (0, 0), floatX, False}.out]
  warnings.warn(
c:\Anaconda3\envs\pymc\lib\site-packages\pymc\logprob\joint_logprob.py:167: UserWarning: Found a random variable that was neither among the observations nor the conditioned variables: [normal_rv{0, (0, 0), floatX, False}.0, normal_rv{0, (0, 0), floatX, False}.out]
  warnings.warn(
c:\Anaconda3\envs\pymc\lib\site-packages\pymc\logprob\joint_logprob.py:167: UserWarning: Found a random variable that was neither among the observations nor the conditioned variables: [normal_rv{0, (0, 0), floatX, False}.0, normal_rv{0, (0, 0), floatX, False}.out]
  warnings.warn(
c:\Anaconda3\envs\pymc\lib\site-packages\pymc\logprob\joint_logprob.py:167: UserWarning: Found a random variable that was neither among the observations nor the conditioned variables: [normal_rv{0, (0, 0), floatX, False}.0, normal_rv{0, (0, 0), floatX, False}.out]
  warnings.warn(
c:\Anaconda3\envs\pymc\lib\site-packages\pymc\logprob\joint_logprob.py:167: UserWarning: Found a random variable that was neither among the observations nor the conditioned variables: [normal_rv{0, (0, 0), floatX, False}.0, normal_rv{0, (0, 0), floatX, False}.out]
  warnings.warn(
c:\Anaconda3\envs\pymc\lib\site-packages\pymc\logprob\joint_logprob.py:167: UserWarning: Found a random variable that was neither among the observations nor the conditioned variables: [normal_rv{0, (0, 0), floatX, False}.0, normal_rv{0, (0, 0), floatX, False}.out]
  warnings.warn(
c:\Anaconda3\envs\pymc\lib\site-packages\pymc\logprob\joint_logprob.py:167: UserWarning: Found a random variable that was neither among the observations nor the conditioned variables: [normal_rv{0, (0, 0), floatX, False}.0, normal_rv{0, (0, 0), floatX, False}.out]
  warnings.warn(
Multiprocess sampling (4 chains in 4 jobs)
NUTS: [sigma_alpha, sigma_beta, alpha, beta, sd]
OriolAbril commented 1 year ago

You should not see those anymore if you update to 5.0.2, it should have been fixed in https://github.com/pymc-devs/pymc/pull/6407. Can you confirm and close the issue if so?

drbenvincent commented 1 year ago

This was fixed in #522