bars dataset + priors#30
Conversation
8628020 to
aee7cdb
Compare
|
General comment about formatting, we currently have a formatting style guide that is in another branch and will be merged. https://github.com/rctn/sparsecoding/blob/formatting/docs/contributing.md |
74b1796 to
008fb07
Compare
72ab6b3 to
86c6206
Compare
|
Thanks for all of the commits! For future reference: let's make sure each branch is adding its own feature. It's a lot easier to review and accept PRs quickly when they're |
|
Yeah old (bad) habits die hard. If it's too much I'm happy to break it up into smaller PRs. But it would be difficult to split everything from moving the BarsDataset to the last tests change, since the tests depend on that dataset. |
| @@ -0,0 +1,66 @@ | |||
| from abc import ABC, abstractmethod | |||
There was a problem hiding this comment.
This is cool. What's the difference between having Prior inherit abc.ABC vs just inheriting the default object type implicitly?
e.g.
class Prior(): or class Prior:
Does it just enforce the interface/inheritance structure somehow?
There was a problem hiding this comment.
It doesn't really enforce anything (being Python and all), but semantically it's designed for this purpose:
https://peps.python.org/pep-3119/
ABCs are simply Python classes that are added into an object’s inheritance tree to signal certain features of that object to an external inspector. Tests are done using isinstance(), and the presence of a particular ABC means that the test has passed.
In addition, the ABCs define a minimal set of methods that establish the characteristic behavior of the type. Code that discriminates objects based on their ABC type can trust that those methods will always be present. Each of these methods are accompanied by an generalized abstract semantic definition that is described in the documentation for the ABC. These standard semantic definitions are not enforced, but are strongly recommended.
|
I have yet to test out everything on my local machine. Will try to do that tomorrow sometime. |
- test with both SpikeSlabPrior and L0Prior
fa88137 to
71d609d
Compare
|
Updated to have Numpy-style docstrings & pruned some commits into other PRs. |
ligeralde
left a comment
There was a problem hiding this comment.
make variable names all explicit (e.g., D --> dimension)
Refactor BarsDataset.
Adds Priors:
Updates unittests.