Skip to content

Important miscellaneous v4 updates #4577

New issue

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

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

Already on GitHub? Sign in to your account

Merged
merged 31 commits into from
Mar 29, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
31 commits
Select commit Hold shift + click to select a range
53683ea
Rename Model.vars to Model.value_vars
brandonwillard Mar 27, 2021
8348cab
Reintroduce the old Model.vars with a deprecation warning
brandonwillard Mar 27, 2021
667e9a2
Add value/rv variable maps to Model
brandonwillard Mar 27, 2021
ddfb003
Change no_transform_object sentinel to UNSET in pymc3.util
brandonwillard Mar 27, 2021
e17dc13
Move logp code into pymc3.distributions.logp and graph functions into…
brandonwillard Mar 27, 2021
d2fb95d
Remove build_named_node_tree and its helper functions
brandonwillard Mar 27, 2021
fe8c991
Move treelist and treedict to pymc3.util
brandonwillard Mar 27, 2021
d7252a7
Remove pymc3.model._walk_up_rv
brandonwillard Mar 27, 2021
e498fff
Remove pymc3.model.as_iterargs
brandonwillard Mar 27, 2021
e293dfd
Move pymc3.model.all_continuous to pymc3.sampling
brandonwillard Mar 27, 2021
09bba30
Move pymc3.model.pandas_to_array to pymc3.aesaraf
brandonwillard Mar 27, 2021
5e2a453
Rename pymc3.tests.test_model_utils to test_glm_utils
brandonwillard Mar 27, 2021
463a775
Rename pymc3.tests.test_models_linear to test_glm_linear
brandonwillard Mar 27, 2021
d6f0166
Add xfail to pymc3.tests.test_variational_inference
brandonwillard Mar 27, 2021
6f2321a
Remove remaining uses of Distribution.default
brandonwillard Mar 27, 2021
f42eb8c
Remove Distribution.get_test_val and Distribution.getattr_value
brandonwillard Mar 28, 2021
1d89da6
Rename Model.test_point to Model.initial_point
brandonwillard Mar 28, 2021
a53815a
Rename Model.check_test_point to Model.point_logps
brandonwillard Mar 28, 2021
93233f7
Make pymc3.util.update_start_vals and check_start_vals Model methods
brandonwillard Mar 28, 2021
65ecd58
Re-enable pymc3.tests.test_util
brandonwillard Mar 28, 2021
6f1564d
Fix issue with single variable input to BlockedStep
brandonwillard Mar 28, 2021
9f615d8
Make GradientSharedStep a subclass of ArrayStepShared
brandonwillard Mar 28, 2021
b94aab0
Make initial_replacements argument in rvs_to_value_vars optional
brandonwillard Mar 28, 2021
85783b2
Rename rv_ancestors to walk_model and add tests
brandonwillard Mar 28, 2021
29dc435
Merge and improve apply_transforms and rvs_to_value_vars
brandonwillard Mar 29, 2021
919289b
Fix a NumPy non-tuple indexing deprecation warning in test_aesaraf
brandonwillard Mar 29, 2021
463e0e7
Convert and transform potentials in the log-likelihood
brandonwillard Mar 29, 2021
6fe56a0
Finish refactoring BlockedStep.competence implementations
brandonwillard Mar 29, 2021
16b7c5f
Fix RaveledVars and size-related issues in Metropolis and MLDA samplers
brandonwillard Mar 29, 2021
a6f2fee
Seed flaky TestSamplePPC.test_deterministic_of_observed_modified_inte…
brandonwillard Mar 29, 2021
ce2c6e0
Re-enable step method tests in pymc3.tests.test_step
brandonwillard Mar 29, 2021
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 4 additions & 6 deletions .github/workflows/pytest.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,6 @@ jobs:
--ignore=pymc3/tests/test_mixture.py
--ignore=pymc3/tests/test_model_graph.py
--ignore=pymc3/tests/test_modelcontext.py
--ignore=pymc3/tests/test_models_linear.py
--ignore=pymc3/tests/test_parallel_sampling.py
--ignore=pymc3/tests/test_profile.py
--ignore=pymc3/tests/test_random.py
Expand All @@ -42,7 +41,6 @@ jobs:
--ignore=pymc3/tests/test_tracetab.py
--ignore=pymc3/tests/test_tuning.py
--ignore=pymc3/tests/test_types.py
--ignore=pymc3/tests/test_util.py
--ignore=pymc3/tests/test_variational_inference.py
--ignore=pymc3/tests/test_sampling_jax.py
--ignore=pymc3/tests/test_dist_math.py
Expand All @@ -53,11 +51,11 @@ jobs:
--ignore=pymc3/tests/test_updates.py
--ignore=pymc3/tests/test_examples.py
--ignore=pymc3/tests/test_glm.py
--ignore=pymc3/tests/test_glm_utils.py
--ignore=pymc3/tests/test_glm_linear.py
--ignore=pymc3/tests/test_gp.py
--ignore=pymc3/tests/test_model.py
--ignore=pymc3/tests/test_model_func.py
--ignore=pymc3/tests/test_model_helpers.py
--ignore=pymc3/tests/test_models_utils.py
--ignore=pymc3/tests/test_ode.py
--ignore=pymc3/tests/test_posdef_sym.py
--ignore=pymc3/tests/test_quadpotential.py
Expand All @@ -79,15 +77,15 @@ jobs:
pymc3/tests/test_distributions_random.py
pymc3/tests/test_examples.py
pymc3/tests/test_glm.py
pymc3/tests/test_glm_utils.py
pymc3/tests/test_gp.py
pymc3/tests/test_model.py
pymc3/tests/test_model_func.py
pymc3/tests/test_model_helpers.py
pymc3/tests/test_models_utils.py
pymc3/tests/test_ode.py
pymc3/tests/test_posdef_sym.py
pymc3/tests/test_quadpotential.py
pymc3/tests/test_shape_handling.py
pymc3/tests/test_step.py

fail-fast: false
runs-on: ${{ matrix.os }}
Expand Down
13 changes: 4 additions & 9 deletions docs/source/Probability_Distributions.rst
Original file line number Diff line number Diff line change
Expand Up @@ -117,20 +117,15 @@ For example, the gamma distribution is positive-valued. If we define one for a m
with pm.Model() as model:
g = pm.Gamma('g', 1, 1)

We notice a modified variable inside the model ``vars`` attribute, which holds the free variables in the model.
We notice a modified variable inside the model ``value_vars`` attribute. These variables represent the values of each random variable in the model's log-likelihood.

::

>>> model.vars
>>> model.value_vars
[g_log__]

As the name suggests, the variable ``g`` has been log-transformed, and this is the space over which sampling takes place.
As the name suggests, the variable ``g`` has been log-transformed, and this is the space over which posterior sampling takes place.

The original variable is simply treated as a deterministic variable, since the value of the transformed variable is simply back-transformed when a sample is drawn in order to recover the original variable. Hence, ``g`` resides in the ``model.deterministics`` list.

::

>>> model.deterministics
[g]
The value of the transformed variable is simply back-transformed when a sample is drawn in order to recover the original variable.

By default, auto-transformed variables are ignored when summarizing and plotting model output.
6 changes: 3 additions & 3 deletions docs/source/developer_guide.rst
Original file line number Diff line number Diff line change
Expand Up @@ -414,8 +414,8 @@ initialised within the same model) as input, for example:
z = pm.Normal('z', 0., 10., shape=10)
x = pm.Normal('x', z, 1., shape=10)

print(m.test_point)
print(m.dict_to_array(m.test_point)) # ==> m.bijection.map(m.test_point)
print(m.initial_point)
print(m.dict_to_array(m.initial_point)) # ==> m.bijection.map(m.initial_point)
print(m.bijection.rmap(np.arange(20)))


Expand Down Expand Up @@ -707,7 +707,7 @@ list of CompoundStep in a for-loop for one sample circle.

For each sampler, it implements a ``step.step`` method to perform MH
updates. Each time a dictionary (``point`` in ``PyMC3`` land, same
structure as ``model.test_point``) is passed as input and output a new
structure as ``model.initial_point``) is passed as input and output a new
dictionary with the free\_RVs being sampled now has a new value (if
accepted, see
`here <https://github.com/pymc-devs/pymc3/blob/6d07591962a6c135640a3c31903eba66b34e71d8/pymc3/step_methods/compound.py#L27>`__
Expand Down
Loading