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

aggregation of filters/activities/etas into unified MultiBind instance #102

Open
5 of 9 tasks
ilibarra opened this issue Dec 19, 2022 · 6 comments
Open
5 of 9 tasks
Assignees
Labels

Comments

@ilibarra
Copy link
Member

ilibarra commented Dec 19, 2022

into mubind/tl/aggregation.py

  • function mb.read_h5 to read multibind model from file, in case not implemented.
  • Function mb.tl.combine_h5 to load and merge BindingModes from h5 files into single MultiBind classes with all those concatenated.
    • Unit test for this, by taking one of the current models and placing it in _data.
  • The activities and log_etas can be unified into a single value. This assumes the model will be merged into a new dataset.
  • Function that measures the distance between two binding modes, by correlation of weights across all positions (this can be reported from other internal functions. Ask for input).
    Next necessary features
  • function mb.get.binding_modes() that takes the already loaded from h5 files, and results in a list of binding modes. The input can be a h5_path/multibind instance, or list of h5_paths/multibind instances. h5 and multibind instances can be mixed.
  • function mb.tl.concatenate, that returns a single multibind instance from the combine_h5 and get.binding_modes.
  • assert after concatenation that log_activities/etas make sense.
  • assert that after concatenation that conv_mono.shape[1] == conv_di.shape[1] + 1, for each filter.
@ege-erdogan ege-erdogan self-assigned this Dec 22, 2022
@ilibarra
Copy link
Member Author

@ege-erdogan may you please indicate to me where mb.tl.combine_h5 is and/or merge it to development if ready? The last task can be separated, I suppose.

@ege-erdogan
Copy link
Collaborator

@ilibarra Sorry for the late response; pushed to the model-aggregation branch now (https://github.com/theislab/mubind/blob/model-aggregation/mubind/tl/aggregation.py).

Model layers are appended to a new (empty) model and activations/etas are summed right now, but changing what is done during aggregation is straightforward in the implementation.

@ilibarra
Copy link
Member Author

ilibarra commented Dec 27, 2022

Next necessary features

  • function mb.get.binding_modes() that takes the already loaded from h5 files, and results in a list of binding modes. The input can be a h5_path/multibind instance, or list of h5_paths/multibind instances. h5 and multibind instances can be mixed.
  • function mb.tl.concatenate, that returns a single multibind instance from the combine_h5 and get.binding_modes.
  • assert after concatenation that log_activities/etas make sense.
  • assert that after concatenation that conv_mono.shape[1] == conv_di.shape[1] + 1, for each filter.

@ilibarra
Copy link
Member Author

ilibarra commented Jan 3, 2023

@ege-erdogan please feel free to use snippets from these scripts for faster understanding/implementation of intermediate steps.
https://github.com/theislab/mubind/blob/development/notebooks/concatenation/01_load_and_concatenate.ipynb

@ilibarra
Copy link
Member Author

ilibarra commented Jan 5, 2023

majorly solved by #108

@ilibarra ilibarra closed this as completed Jan 5, 2023
@ilibarra ilibarra reopened this Jan 15, 2023
@ilibarra
Copy link
Member Author

Reopening due to test_aggregation.py not working. It needs inspection.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants