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

Improve the scaling #182

Open
zaikunzhang opened this issue Apr 2, 2024 · 0 comments
Open

Improve the scaling #182

zaikunzhang opened this issue Apr 2, 2024 · 0 comments

Comments

@zaikunzhang
Copy link
Member

zaikunzhang commented Apr 2, 2024

This has been requested a few times. See

libprima/PRIMA.jl#4
#95
#181

Currently, the MATLAB and Julia interfaces do scale the problem if requested and if possible:

% Scale the problem if necessary and if intended.

https://github.com/libprima/PRIMA.jl/blob/2714339cfecf6b895e7b1ef5f278f1c105c4be1a/src/PRIMA.jl#L120

Maybe we can add two optional arguments scaling_factor and shift, to perform the scaling

x_before_scaling = scaling_factor*x_after_scaling + shift

or, equivalently,

x_after_scaling = (x_before_scaling - shift) / scaling_factor

In the high-level interfaces, there should be an option scale taking three possible values

  • "none" (default)
  • "auto"
  • a vector of positive numbers

where "auto" means that the scaling factor will be decided automatically according to the given problem. Not that it is nontrivial to decide a suitable scaling factor.

Similarly, there should be an option shift taking three possible values

  • "none" (default)
  • "auto"
  • a vector of real numbers

where "auto" means that the shift will be decided automatically according to the given problem (e.g., shift = x0).

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

1 participant