Skip to content

Commit

Permalink
Fix pareto k threshold typo in reloo function (arviz-devs#1580)
Browse files Browse the repository at this point in the history
* Bug: fix pareto k threshold typo in reloo function

* Update changelog
  • Loading branch information
teddygroves authored and utkarsh-maheshwari committed May 27, 2021
1 parent 48f9009 commit 8e93cac
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
### Maintenance and fixes
* Enforced using coordinate values as default labels ([1201](https://github.com/arviz-devs/arviz/pull/1201))
* Integrate `index_origin` with all the library ([1201](https://github.com/arviz-devs/arviz/pull/1201))
* Fix pareto k threshold typo in reloo function ([1580](https://github.com/arviz-devs/arviz/pull/1580))

### Deprecation
* Deprecated `index_origin` and `order` arguments in `az.summary` ([1201](https://github.com/arviz-devs/arviz/pull/1201))
Expand Down
2 changes: 1 addition & 1 deletion arviz/stats/stats_refitting.py
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ def reloo(wrapper, loo_orig=None, k_thresh=0.7, scale=None, verbose=True):
warnings.warn("reloo is an experimental and untested feature", UserWarning)

if np.any(khats > k_thresh):
for idx in np.argwhere(khats.values > 0.7):
for idx in np.argwhere(khats.values > k_thresh):
if verbose:
_log.info("Refitting model excluding observation %d", idx)
new_obs, excluded_obs = wrapper.sel_observations(idx)
Expand Down

0 comments on commit 8e93cac

Please sign in to comment.