Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Refactor Basis - All PRs #265

Open
BalzaniEdoardo opened this issue Nov 13, 2024 · 0 comments
Open

Refactor Basis - All PRs #265

BalzaniEdoardo opened this issue Nov 13, 2024 · 0 comments

Comments

@BalzaniEdoardo
Copy link
Collaborator

NeMoS basis API

Posting here all our thoughts on the Basis API changes

PR1

Release first, and FutureWarning for breaking compatibility.

  • split conv and eval basis:

  • naming?
    Same naming.

  • basis module structure?

    • Have default but changing config with a method or an attribute
    • Mixin class for conv and eval and return another initialized object
    • Change with a factory classmethod set_mode, always new object.
 class _SomeBasisEval{SomeBasis, EvalMixin}
       def __init__(self,old):


def set_mode(self, mode):
    self._mode = mode

    if mode == "eval":
       return _SomeBasisEval(self)
- Read-only property mode.
- Example in docstrings.
- How to guide for mode switching

PR1.5

  • documentation: what do we need to include? At minimum a table with each basis and how they look
  • every basis should have same plot:
Basis Default mode Kernel (fig) Example (link)
  • Linkable figs/tutorial

PR2

  • allow multi-dimensional stimuli in both modalities?
    Yes

PR3

  • add a public set_shape that sets the input shapes?

  • transformer basis: use splitting methods to unpack the feature axis? sharp bit: must first initialize basis before passing a concatenated feature matrix (i.e. tranformer only works when basis is initialized)
    Yes,

  • add a public set_shape_and_compute_features that calls both initialize and compute_features?

PR4

  • add a matrix multiplication method, ie. a tree_map to multiply glm coeff with an evaluate_on_grid output? Sample points in conv should be window_size, in eval?
  • Default mode based (100 for eval, window_size for conv) let people set them if they want, warn if < window_size.

PR5

  • documentation: what do we need to include?
    Document basis properties
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant