Allow data validation to be skipped to improve posterior_predict
performance with newdata
#1521
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.
When
posterior_predict
is called withnewdata
,validate_newdata
will be called and this represents a non-trivial amount of the total execution time. Advanced users may want to skip this step when they know their data already has the proper structure.As there are different kinds of validation functions in the package, the proposed argument name is
skip_validate_data
.The change is made for both
current_data
andcurrent_data2
and should work without issue when passed via...
fromstandata
andpp_check
calls.Two calls of
current_data
inget_refmodel
had...
added so the argument can also be used there.There is one
current_data2
call left without passing...
as it's insidevalidate_newdata
so it'd be pointless there.