You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
window_size: The size of the window for basis construction.
Dependency Between n_basis_funcs and decay_rates
Current Behavior:
n_basis_funcs must equal the length of decay_rates. If this condition is not met, an error is raised in the setter of decay_rates.
However, users can modify n_basis_funcs first, followed by decay_rates, to avoid this error.
Proposed Improvement:
When a new list of decay_rates is provided, automatically adjust n_basis_funcs to match the length of decay_rates, as the latter inherently determines the number of basis functions.
The reverse (adjusting decay_rates based on n_basis_funcs) does not make sense, so errors should instead be raised in the setter for n_basis_funcs.
Cross-validation Implication:
Since the number of basis functions for exponential decay is tied to the decay rates, cross-validating decay_rates suffices for validation.
Dependency Between n_basis_funcs and window_size
Constraint:
window_size must not be smaller than n_basis_funcs for orthogonalization to work.
Challenge with Current Validation:
Raising errors in the setters can make joint cross-validation problematic:
If both setters check the other parameter, some parameter combination cannot be set after initialization. For example, reducing the window_size to a lower value then the initial number of basis or increasing the number of basis to a larger value than the initial window size would be impossible (e.g., reducing window_size fails due to too many basis functions, while increasing n_basis_funcs fails due to insufficient window_size).
If only one setter performs validation, the success or failure depends on the order in which parameters are modified.
Proposed Improvement:
Remove validation from the setters and only enforce constraints at class initialization or compute time.
This allows flexibility for cross-validation workflows, where only valid combinations of n_basis_funcs and window_size are used.
Summary
To ensure usability and flexibility:
n_basis_funcs and decay_rates: Automatically adjust n_basis_funcs when decay_rates is set, and validate in the n_basis_funcs setter.
n_basis_funcs and window_size: Perform validation at compute time, not in setters, to support joint cross-validation of parameters.
The text was updated successfully, but these errors were encountered:
Additionally, OrthExponentialBasis performs orthogonalization inside the basis, and thus n_basis_funcs does not specify the output shape (and this is the only basis where this is the case). Instead, this basis should just be ExponentialBasis, and we the orthogonalization should happen externally
Dependency Between Basis Parameters
Three parameters of the basis are interdependent:
n_basis_funcs
: Number of basis functions.decay_rates
: List of decay rates.window_size
: The size of the window for basis construction.Dependency Between
n_basis_funcs
anddecay_rates
Current Behavior:
n_basis_funcs
must equal the length ofdecay_rates
. If this condition is not met, an error is raised in the setter ofdecay_rates
.n_basis_funcs
first, followed bydecay_rates
, to avoid this error.Proposed Improvement:
decay_rates
is provided, automatically adjustn_basis_funcs
to match the length ofdecay_rates
, as the latter inherently determines the number of basis functions.decay_rates
based onn_basis_funcs
) does not make sense, so errors should instead be raised in the setter forn_basis_funcs
.Cross-validation Implication:
decay_rates
suffices for validation.Dependency Between
n_basis_funcs
andwindow_size
Constraint:
window_size
must not be smaller thann_basis_funcs
for orthogonalization to work.Challenge with Current Validation:
window_size
fails due to too many basis functions, while increasingn_basis_funcs
fails due to insufficientwindow_size
).Proposed Improvement:
n_basis_funcs
andwindow_size
are used.Summary
To ensure usability and flexibility:
n_basis_funcs
anddecay_rates
: Automatically adjustn_basis_funcs
whendecay_rates
is set, and validate in then_basis_funcs
setter.n_basis_funcs
andwindow_size
: Perform validation at compute time, not in setters, to support joint cross-validation of parameters.The text was updated successfully, but these errors were encountered: