Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Adding Inline example for psislw and r2_score. #1129

Merged
merged 7 commits into from
Apr 8, 2020

Conversation

smit-s
Copy link
Contributor

@smit-s smit-s commented Mar 31, 2020

Description

psislw and r2_score functions in stats.py did not have any inline examples. This PR adds inline example to these methods and addresses issue #1057.

Checklist

  • Follows official PR format
  • Code style correct (follows pylint and black guidelines)
  • Changes are listed in changelog

@smit-s smit-s changed the title Adding an Inline exmple for psislw and r2_score. Adding Inline example for psislw and r2_score. Mar 31, 2020
@codecov
Copy link

codecov bot commented Mar 31, 2020

Codecov Report

Merging #1129 into master will increase coverage by 0.13%.
The diff coverage is n/a.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #1129      +/-   ##
==========================================
+ Coverage   92.67%   92.81%   +0.13%     
==========================================
  Files          93       93              
  Lines        9097     9181      +84     
==========================================
+ Hits         8431     8521      +90     
+ Misses        666      660       -6     
Impacted Files Coverage Δ
arviz/stats/stats.py 96.32% <ø> (ø)
arviz/plots/traceplot.py 97.33% <0.00%> (-1.26%) ⬇️
arviz/data/inference_data.py 81.88% <0.00%> (-1.26%) ⬇️
arviz/utils.py 90.00% <0.00%> (-0.96%) ⬇️
arviz/plots/backends/bokeh/traceplot.py 95.97% <0.00%> (-0.43%) ⬇️
arviz/data/io_pystan.py 98.67% <0.00%> (-0.40%) ⬇️
arviz/rcparams.py 93.10% <0.00%> (ø)
arviz/plots/backends/__init__.py 29.11% <0.00%> (ø)
arviz/plots/backends/matplotlib/traceplot.py 99.15% <0.00%> (+0.06%) ⬆️
arviz/plots/backends/bokeh/rankplot.py 93.33% <0.00%> (+1.66%) ⬆️
... and 2 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update aca28da...ad8d942. Read the comment docs.


Examples
--------
Get Pareto smoothed importance sampling (PSIS):
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Get Pareto smoothed importance sampling (PSIS) log weights.

We should also add a reference, i.e. https://arxiv.org/abs/1507.02646 (see ess function for an example on the References section)

@ahartikainen
Copy link
Contributor

Looks good, after addressing the reference issue, this is ready.

@aloctavodia aloctavodia merged commit c2b80b7 into arviz-devs:master Apr 8, 2020
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants