-
Notifications
You must be signed in to change notification settings - Fork 57
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
Refactor RandomVariable
#164
Merged
marvinpfoertner
merged 54 commits into
probabilistic-numerics:master
from
marvinpfoertner:refactor/random-variable
Aug 30, 2020
Merged
Refactor RandomVariable
#164
marvinpfoertner
merged 54 commits into
probabilistic-numerics:master
from
marvinpfoertner:refactor/random-variable
Aug 30, 2020
Conversation
This file contains 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
marvinpfoertner
added
refactoring
Refactoring of existing functionality
randvars
Issues related to random variables
labels
Aug 20, 2020
marvinpfoertner
force-pushed
the
refactor/random-variable
branch
2 times, most recently
from
August 20, 2020 16:18
18adbdb
to
3cf89d3
Compare
This was
linked to
issues
Aug 20, 2020
JonathanWenger
requested changes
Aug 20, 2020
In order to merge this PR the following TODOs need to be resolved:
|
Codecov Report
@@ Coverage Diff @@
## master #164 +/- ##
==========================================
+ Coverage 73.49% 74.10% +0.61%
==========================================
Files 58 61 +3
Lines 3060 3167 +107
Branches 393 409 +16
==========================================
+ Hits 2249 2347 +98
+ Misses 660 659 -1
- Partials 151 161 +10
Continue to review full report at Codecov.
|
marvinpfoertner
force-pushed
the
refactor/random-variable
branch
from
August 24, 2020 16:42
6297524
to
8bdeb76
Compare
Merged
marvinpfoertner
force-pushed
the
refactor/random-variable
branch
from
August 26, 2020 16:21
479d730
to
bbbefcf
Compare
marvinpfoertner
force-pushed
the
refactor/random-variable
branch
3 times, most recently
from
August 28, 2020 07:04
a765fe8
to
1438bc9
Compare
marvinpfoertner
changed the title
[WIP] Refactor RandomVariable
Refactor Aug 28, 2020
RandomVariable
marvinpfoertner
force-pushed
the
refactor/random-variable
branch
2 times, most recently
from
August 28, 2020 10:54
9414231
to
263a534
Compare
marvinpfoertner
force-pushed
the
refactor/random-variable
branch
from
August 28, 2020 16:47
553d19f
to
87f9c53
Compare
JonathanWenger
approved these changes
Aug 28, 2020
JonathanWenger
approved these changes
Aug 29, 2020
JonathanWenger
approved these changes
Aug 29, 2020
11 tasks
This was
linked to
issues
Aug 30, 2020
6 tasks
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
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.
In essence, this PR is a substantial refactor of the
RandomVariable
andDistribution
classes that:Distribution
s and integrates their functionality into theRandomVariable
class (closes Remove Distribution class and only use RandomVariable with subclasses #131)RandomVariable
subclass for everyDistribution
subclass (closes Remove Distribution class and only use RandomVariable with subclasses #131)probnum.prob
module and introduces the newprobnum.random_variables
moduleRandomVariable
andNormal
to allow for flexible and efficient recombination of sampling, mean/cov/var/entropy computation, and (log){cd,pf,pm}f evaluation (closes Refactor Normal class to compositional pattern #145)cached_property
decorators for all random variable properties in order to save computation time in case the distribution of the random variable is implicity given, e.g. via an MCMC samplerRandomVariable
class, its subclasses and all related parts of the API. It also introduces typing infrastructure in theprobnum.typing
andprobnum.utils.typeutils
modules (addresses Type Hints #61)probnum.randvars
to resolve the pylint messages #159. The remaining disabled message will be fixed in a follow-up documentation PRThis should also fix the bug about the sampling shapes, i.e. #57, but this is not tested yet.
Many of the changes are not yet documented properly. This will be done in a follow-up PR by @JonathanWenger with my support.