Fix bug in IS method error message + documentation typos#326
Open
ishaan-arora-1 wants to merge 1 commit intostan-dev:masterfrom
Open
Fix bug in IS method error message + documentation typos#326ishaan-arora-1 wants to merge 1 commit intostan-dev:masterfrom
ishaan-arora-1 wants to merge 1 commit intostan-dev:masterfrom
Conversation
Fix missing parentheses on `implemented_is_methods` in the error message inside `assert_importance_sampling_method_is_implemented()`, which caused the function object to be pasted instead of the actual method names. Also fix several typos across roxygen comments and the corresponding generated .Rd man pages: - "dependend" -> "dependent" (diagnostics.R) - "k-ht" -> "k-hat" (diagnostics.R) - "The pages provides definitions to" -> "The page provides definitions of" (loo-glossary.R) - "log-likeliood" -> "log-likelihood" (split_moment_matching.R) - "subampled" -> "subsampled" (loo_subsample.R) - "comaprison" -> "comparison" (loo_compare.psis_loo_ss_list.R) - "matrices or , one" -> "matrices, one" (loo_model_weights.R) - "widely application" -> "widely applicable" (loo-package.R) Fixes stan-dev#325
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #326 +/- ##
=======================================
Coverage 92.78% 92.78%
=======================================
Files 31 31
Lines 2992 2992
=======================================
Hits 2776 2776
Misses 216 216 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Hey! I was going through the codebase and spotted a small bug along with some typos. Figured I'd clean them up in one go.
Bug fix
In
R/importance_sampling.R, the functionassert_importance_sampling_method_is_implemented()constructs an error message when an unsupported importance sampling method is passed. On line 117,implemented_is_methodsis used without():Since
implemented_is_methodsis a function, this ends up pasting the function object itself into the error message instead of the actual method names ("psis","tis","sis"). The condition check on line 113 correctly callsimplemented_is_methods(), so this was just missed in the message string.Typos
While reading through the source I also noticed these scattered across the roxygen comments:
I also updated the corresponding
.Rdman pages to match.Fixes #325