Skip to content
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

Two level pairwise t #204

Merged
merged 19 commits into from
Jun 10, 2020
Merged

Two level pairwise t #204

merged 19 commits into from
Jun 10, 2020

Conversation

scanny
Copy link
Contributor

@scanny scanny commented Jun 9, 2020

Changes required for two-level pairwise-t display, primarily adding _Slice.pairwise_indices_alt and _Slice.scale_mean_pairwise_indices_alt along with processing the transforms-dict construction parameter for multiple threshold values.

@coveralls
Copy link

coveralls commented Jun 9, 2020

Coverage Status

Coverage remained the same at 100.0% when pulling aa0a98f on two-level-pairwise-t into 527f702 on master.


@lazyproperty
def _df(self):
# if the cube to which the slice belongs is a CATxMRxITSELF
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If it's possible i would add a docstring for degree of freedom just summarising the existing comment here

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I didn't write this class, I just reordered its methods while I was cleaning up the module, so I don't know what this method is supposed to do (and don't really want to right at the moment :).

Copy link
Contributor

@ernestoarbitrio ernestoarbitrio left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

some minor comments

@scanny
Copy link
Contributor Author

scanny commented Jun 10, 2020

k, fixed the two docstrings, explanations on the rest :)

scanny added 18 commits June 10, 2020 10:03
Basic manipulation of transforms is general to all cube-partition
sub-types. Move ownership of `._transforms_arg` instance variable to
CubePartition in preparation for moving other shared transforms
responsibilities.
Generalize `._transforms_dict` property to CubePartition.
Replace redundant local implementations with property on base class.
Also generally clean up while in the neighborhood.

* Old-style classes have unexpected behavior differences in corner
  cases, in particular with mocks in unit tests. Make these new-style
  classes by adding (object) superclass.

* Normalize method ordering.

* Improve docstrings and formatting.
Make PairwiseSignificance.pairwise_indices() a classmethod call rather
than requiring caller to instantiate a PairwiseSignificance object and
then make the call.
* Add Python-literal expection facility
* Condense same-form _Slice.pairwise_indices integration tests into
  a single parametrized test.
* Add or rename a fixture or two as required.
Also add a couple omitted cases while we're in there and it's so easy.
Avoid using numpy types as interface (return) types. Use a tuple for the
container of the column-idx tuples instead of an np.ndarray.

Using a Python-native type makes using the method easier, requiring no
special methods the user may not be as familiar with. Using an immutable
type in a lazyproperty is wise because it prevents a caller from
mutating a value that may be returned to a different caller in another
call.
@ernestoarbitrio ernestoarbitrio merged commit e9d3191 into master Jun 10, 2020
@ernestoarbitrio ernestoarbitrio deleted the two-level-pairwise-t branch June 10, 2020 17:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants