[bug] error in the warning of pmb.plot_dependence

Hi guys,
I executed the example in Bayesian Additive Regression Trees: Introduction — PyMC example gallery

up to pmb.plot_dependence(μ, X=X, Y=Y, grid=(2, 2), func=np.exp); everything works great.

However, upon usage of pmb.plot_dependence command,

you get:
xxx\envs\xxx\Lib\site-packages\pymc_bart\utils.py:145: FutureWarning: This function has been deprecated. Use plot_pd instead.

By digging into the code of utils.py, I believe the message should actually read

xxx\envs\xxx\Lib\site-packages\pymc_bart\utils.py:145: FutureWarning: This function has been deprecated. Use plot_pdp instead.

instead, that is we add a “p” to “plot_pd”. as it is “plot_pdp” that does the job



1 Like


Thanks for reporting this error. You’re right. Also, a reminder that we need to update the docs. Let me know if you want to send a PR fixing the message, otherwise I will update soon.

1 Like

if you could do it I would be grateful, I am really not familiar with the functioning of the work process and I would likely slow down things rather than helping out :slight_smile:
by the way, thanks a lot for the fantastic expansion, very useful.

1 Like

It’s quite intimidating to do a PR for the first time, but the devs here are extremely patient and supportive (ask me how I know), so it’s a really great place to learn by doing. You have a perfect issue for a first go at changing something, so I’d really encourage you to have a try. You won’t mess anything up, and you’ll learn a lot!

1 Like

Typos are some of the best first issues to tackle!

1 Like

Oh I missed the encouraging messages, and already fixed the typo. Sorry about that. Thanks for the report @andrea if at some point you feel ready to contribute with code or examples/documentation let me know and I can guide you in the process.

Hi all and thanks for the encouragement! I will certainly participate in future with a few corrections. For example, fixing the nice bicycle example, which is in fact the location where I go the problem in first place! I am very unfamiliar with python and machine learning as my background is classical/boring economics (matlab), so I apologize if I will be slow/hesitant and likely over-wordy, but I would indeed be happy to help!