Thread: [Pymc-user] use TkAgg?
Status: Beta
Brought to you by:
fonnesbeck
From: Hanno K. <kl...@ph...> - 2006-04-21 09:24:54
|
Hi, I have just started toying around with PyMC. However, I ran directly in the beginning into a catch: I don't have Tkinter installed for various reasons. This throws up an error when importing PyMC, because it wants the TkAgg backend of matplotlib to be used. However, after changing use('TkAgg') into use('GTK') in Matplot.py and setting interactive=True in matplotlibrc, everything works well. Is there a deeper reason for "hard-wiring" TkAgg usage into PyMC and are there further problems down the road I have to anticipate with my approach? Thanks, Hanno -- Hanno Klemm kl...@ph... |
From: Christopher F. <ch...@tr...> - 2006-04-21 10:52:29
Attachments:
smime.p7s
|
On Apr 21, 2006, at 5:24 AM, Hanno Klemm wrote: > Is there a deeper reason for "hard-wiring" TkAgg usage into PyMC and > are there further problems down the road I have to anticipate with my > approach? Hello Hanno, The only reason TkAgg is hard-wired into PyMC is that it was a better default than WxAgg, since Tkinter is easy to install on most systems (unlike WXpython), and even comes built in to some python distributions, like ActiveState. There should be no problem in choosing another backend. Good luck, Chris -- Christopher J. Fonnesbeck Population Ecologist, Marine Mammal Section Fish & Wildlife Research Institute (FWC) St. Petersburg, FL Adjunct Assistant Professor Warnell School of Forest Resources University of Georgia Athens, GA T: 727.235.5570 E: chris at trichech.us |
From: Hanno K. <kl...@ph...> - 2006-04-21 13:02:25
|
Hi Christopher, thanks for the quick reply. Another question is bothering me at the moment (this time maybe a little less technical): I understand that the parameters to be estimated are defined via the sample.parameter method. There I can define a proposed distribution via dist='some_dist'. However, 'some_dist' needs to be zero-centered, if I understand the comment in the code correctly. What is the best way of dealing with a case where you want to have your parameters greater-equal than zero? Or am I missing the point completely? Best regards, Hanno Christopher Fonnesbeck <ch...@tr...> said: > On Apr 21, 2006, at 5:24 AM, Hanno Klemm wrote: > > > Is there a deeper reason for "hard-wiring" TkAgg usage into PyMC and > > are there further problems down the road I have to anticipate with my > > approach? > > Hello Hanno, > > The only reason TkAgg is hard-wired into PyMC is that it was a better > default than WxAgg, since Tkinter is easy to install on most systems > (unlike WXpython), and even comes built in to some python > distributions, like ActiveState. There should be no problem in > choosing another backend. > > Good luck, > Chris > > -- > Christopher J. Fonnesbeck > > Population Ecologist, Marine Mammal Section > Fish & Wildlife Research Institute (FWC) > St. Petersburg, FL > > Adjunct Assistant Professor > Warnell School of Forest Resources > University of Georgia > Athens, GA > > T: 727.235.5570 > E: chris at trichech.us > > > -- Hanno Klemm kl...@ph... |
From: Christopher F. <ch...@tr...> - 2006-04-21 18:56:17
Attachments:
smime.p7s
|
On Apr 21, 2006, at 9:02 AM, Hanno Klemm wrote: > > I understand that the parameters to be estimated are defined via the > sample.parameter method. There I can define a proposed distribution > via dist='some_dist'. However, 'some_dist' needs to be zero-centered, > if I understand the comment in the code correctly. What is the best > way of dealing with a case where you want to have your parameters > greater-equal than zero? Or am I missing the point completely? Well, in theory the proposal distribution is arbitrary -- it can literally be any distribution over the support of the parameter. In practice, however, some distributions work better than others. A noncentral proposal distribution is fine, but it may not converge as efficiently as a central one. I can't think of a reason a priori that you would want to have a nonzero expected value, but perhaps you have one. At the moment, 3 proposal distributions are built-in to PyMC: normal (the default), uniform, and double exponential. The double exponential proposal is interesting because it will occasionally propose extreme values, due to its long tails, which can help avoid metastable behaviour. I plan on releasing, with the official 1.0 version, a more comprehensive user's guide that will rather explicitly lay all this out. Regards, Chris -- Christopher J. Fonnesbeck Population Ecologist, Marine Mammal Section Fish & Wildlife Research Institute (FWC) St. Petersburg, FL Adjunct Assistant Professor Warnell School of Forest Resources University of Georgia Athens, GA T: 727.235.5570 E: chris at trichech.us |