Could not generate output statistics... not sure why

197 views
Skip to first unread message

Whit Armstrong

unread,
Sep 21, 2009, 10:14:22 AM9/21/09
to py...@googlegroups.com
>>> fit = M.stats()
Could not generate output statistics for Sigma_B_raw
Could not generate output statistics for Tau_B_raw
Could not generate output statistics for rho_B
Could not generate output statistics for B

Can pymc not produce stats for matrix types?

Clearly, I can make the calcs myself to operate on each element, but it's a bit of a pita to re-write all the stats calcs that pymc already has.

Thanks,
Whit


Chris Fonnesbeck

unread,
Oct 10, 2009, 4:06:44 PM10/10/09
to PyMC
On Sep 22, 3:14 am, Whit Armstrong <armstrong.w...@gmail.com> wrote:
> >>> fit = M.stats()
>
> Could not generate output statistics for Sigma_B_raw
> Could not generate output statistics for Tau_B_raw
> Could not generate output statistics for rho_B
> Could not generate output statistics for B
>

Try this with the most recent development code, and see if it goes
away. I recently fixed a bug that produced similar results.

cf

Andrea Apolloni

unread,
Dec 9, 2014, 9:52:45 AM12/9/14
to py...@googlegroups.com
Dear all,
I'm having a lot of problem with pymc recently. I've attached the recent python I've done.
So I have a complicted SIR model where there are 9 age groups that got infected at a certain point then recovered. at the same time there are demographic trends.
I'm calibrating the model using a Poisson statistical model. as data I have the sero distribution, that is the the number of individuals who has suffered the disease by age group, that is a vector of number
I'm following literature for the SIR  model using the spi.odeint to solve the differential equation. And then save in avector (Serop1980) the number of people who has suffered the disease.
The model seems working fine but at the end 

Could not generate output statistics for pobservationKorea_1980_0

Could not generate output statistics for pobservationKorea_1980_2

Could not generate output statistics for pobservationKorea_1980_5

Could not generate output statistics for latency

Could not generate output statistics for pobservationKorea_1980_3

Could not generate output statistics for pobservationKorea_1980_4

Could not generate output statistics for pobservationKorea_1980_1

Could not generate output statistics for gammaC

Could not generate output statistics for pobservationKorea_1980_6

Could not generate output statistics for Serop1980

Could not generate output statistics for gammaA

Could not generate output statistics for PK2

Could not generate output statistics for predict

and then


File "/Library/Python/2.7/site-packages/pymc-2.3.2-py2.7-macosx-10.9-intel.egg/pymc/Model.py", line 415, in write_csv

    shape = values['mean'].shape

TypeError: 'NoneType' object has no attribute '__getitem__'

What am I making wrong?

Thanks for all your help
Andrea

Thanks for any help
 
Whit


MCMC_model_vertical11.py
MCMC_provaKorea.py

Abraham D. Flaxman

unread,
Dec 11, 2014, 2:03:17 PM12/11/14
to py...@googlegroups.com

It is going to be quite hard for an outsider to debug these 1000+ lines of code, especially without the input files to make them run.  That said, this error comes up when something goes wrong in the stats() function (code here: https://github.com/pymc-devs/pymc/blob/2.3/pymc/database/base.py#L197 ), and the only time that happens to me is when I try to calculate MC error without taking enough samples:

 

In [1]: import pymc as pm

In [2]: x = pm.Uniform('x',0,1)

In [3]: pm.MCMC([x]).sample(10)

[-----------------100%-----------------] 10 of 10 complete in 0.0 sec

In [4]: x.stats()

Could not generate output statistics for x

 

So maybe taking more samples on line 17 of MCMC_provaKorea.py will make your problem go away.

 

Good luck!

 

--Abie

 

 

Abraham D. Flaxman

Assistant Professor

Institute for Health Metrics and Evaluation | University of Washington

2301 5th Avenue, Suite 600 | Seattle, WA 98121| USA

Tel: +1-206-897-2802 | Mobile: +1-412-726-0401 | Fax: +1-206-897-2899 UW | Campus Mailbox: 358210

ab...@uw.edu | http://healthmetricsandevaluation.org| http://healthyalgorithms.com

--
You received this message because you are subscribed to the Google Groups "PyMC" group.
To unsubscribe from this group and stop receiving emails from it, send an email to pymc+uns...@googlegroups.com.
To post to this group, send email to py...@googlegroups.com.
Visit this group at http://groups.google.com/group/pymc.
For more options, visit https://groups.google.com/d/optout.

Reply all
Reply to author
Forward
0 new messages