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

Document mapping between function arguments and equations #569

Closed
NAThompson opened this issue May 22, 2024 · 2 comments
Closed

Document mapping between function arguments and equations #569

NAThompson opened this issue May 22, 2024 · 2 comments

Comments

@NAThompson
Copy link
Contributor

NAThompson commented May 22, 2024

In the documentation for RMTS, we see the equation

$$ \min_{w} \frac{1}{2} \mathbf{w}^{T}\mathbf{H}\mathbf{w} + \frac{1}{2}\beta \mathbf{w}^{T}\mathbf{w} + \frac{1}{2}\frac{1}{\alpha} \sum_{i}^{nt} [F(x_i) - y_{t_i}]^2 $$

where "α and β are regularization coefficients". In the usage section, we see the example code

sm = RMTC(
    xlimits=xlimits,
    num_elements=20,
    energy_weight=1e-15,
    regularization_weight=0.0,
)

It would appear that energy_weight is β, and that the regularization weight is 1/α? Nonetheless, this relation is not made explicit. Would it be sensible to update the docs thusly?

sm = RMTC(
    xlimits=xlimits,
    num_elements=20,
    energy_weight=1e-15, # corresponds to β in  equation (1)
    regularization_weight=0.0, # corresponds to α in equation (1)
)
@relf
Copy link
Member

relf commented May 24, 2024

I agree the mapping between the documentation and the API is not clear.
Actually, we should mention explicitely in the documentation the section 3.5 - Summary and implementation of the paper. It defines α'=α and β'=αβ which corresponds respectively to the energy_weight and the regularization_weight arguments (so the opposite of what is stated above).

@relf
Copy link
Member

relf commented May 28, 2024

Fixed in #578

@relf relf closed this as completed May 28, 2024
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

No branches or pull requests

2 participants