-
Notifications
You must be signed in to change notification settings - Fork 2.1k
Add experimental dims
module with objects that follow dim-based semantics (like xarray without coordinates)
#7820
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
Changes from all commits
Commits
Show all changes
10 commits
Select commit
Hold shift + click to select a range
43bb546
Convert mu to TensorVariable in Normal
ricardoV94 8c244c1
Bump PyTensor dependency
ricardoV94 085531b
Implement xarray like semantics in dims module
ricardoV94 2f97f0d
Allow registering XTensorVariables directly in model
ricardoV94 efa8b67
Allow Dim version of simple SymbolicRandomVariables
ricardoV94 6c0896c
Implement Dim ZeroSumNormal
ricardoV94 d26a852
Arviz don't fail hard on incompatible coordinate lengths
ricardoV94 711c0f1
Tweaks to model_graph to play nice with XTensorVariables
ricardoV94 8f039ba
Core notebook on dims module
ricardoV94 2a38bc1
List dims module functionality in the docs
ricardoV94 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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
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
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
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
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
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -23,6 +23,7 @@ API | |
api/backends | ||
api/misc | ||
api/testing | ||
api/dims | ||
|
||
------------------ | ||
Dimensionality | ||
|
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
.. _api_dims: | ||
|
||
Dims | ||
==== | ||
|
||
.. warning:: This module is experimental and may contain critical breaks. API changes are expected in future releases. | ||
|
||
This submodule contains functions for defining distributions and operations that use explicit dimensions. | ||
ricardoV94 marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
||
The module is presented in :ref:`dims_module`. | ||
|
||
|
||
.. toctree:: | ||
|
||
dims/model | ||
dims/math | ||
dims/distributions | ||
dims/transforms |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
************* | ||
Distributions | ||
************* | ||
|
||
Scalar distributions | ||
==================== | ||
|
||
.. currentmodule:: pymc.dims | ||
.. autosummary:: | ||
:toctree: generated/ | ||
:template: distribution.rst | ||
|
||
Flat | ||
HalfFlat | ||
Normal | ||
HalfNormal | ||
LogNormal | ||
StudentT | ||
HalfStudentT | ||
Cauchy | ||
HalfCauchy | ||
Beta | ||
Laplace | ||
Gamma | ||
InverseGamma | ||
|
||
|
||
Vector distributions | ||
==================== | ||
|
||
.. currentmodule:: pymc.dims | ||
.. autosummary:: | ||
:toctree: generated/ | ||
:template: distribution.rst | ||
|
||
Categorical | ||
MvNormal | ||
ZeroSumNormal |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
*************************************** | ||
Mathematical operations with dimensions | ||
*************************************** | ||
|
||
This module wraps all the mathematical operations defined in :ref:`pytensor.xtensor.math <pytensor:libdoc_xtensor_math>`. | ||
|
||
It includes a ``linalg`` submodule that wraps all the operations defined in :ref:`pytensor.xtensor.linalg <pytensor:libdoc_xtensor_linalg>`. | ||
|
||
Operations defined at the module level in :ref:`pytensor.xtensor <pytensor:libdoc_xtensor_module_function>` are available at the ``pymc.dims`` module level. |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
****************** | ||
Model constructors | ||
****************** | ||
|
||
.. currentmodule:: pymc.dims | ||
.. autosummary:: | ||
:toctree: generated/ | ||
|
||
Data | ||
Deterministic | ||
Potential |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
*********************** | ||
Distribution Transforms | ||
*********************** | ||
|
||
.. currentmodule:: pymc.dims.transforms | ||
.. autosummary:: | ||
:toctree: generated/ | ||
|
||
LogTransform | ||
LogOddsTransform | ||
ZeroSumTransform |
Oops, something went wrong.
Oops, something went wrong.
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.
Uh oh!
There was an error while loading. Please reload this page.