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

Fixed-point is not returned when indexing is set #7

Open
BurgerAndreas opened this issue May 30, 2024 · 0 comments
Open

Fixed-point is not returned when indexing is set #7

BurgerAndreas opened this issue May 30, 2024 · 0 comments

Comments

@BurgerAndreas
Copy link

BurgerAndreas commented May 30, 2024

It seems like the best fixed-point estimate z_star = lowest_xest is only returned when the indexed trajectory is empty.
When one specifies indexing, they are not getting the best fixed-point estimate.

Relevant Code

From the Broyden solver

# Store the solution at the specified index
if indexing and (nstep+1) in indexing:
    indexing_list.append(lowest_xest)

# ...

# at least return the lowest value when enabling  ``indexing''
if indexing and not indexing_list:
    indexing_list.append(lowest_xest)

info = solver_stat_from_info(stop_mode, lowest_dict, trace_dict, lowest_step_dict)
return lowest_xest, indexing_list, info

Note that the best fixed-point estimate z_star = lowest_xest is ignored in DEQIndexing

_, trajectory, info = self._solve_fixed_point()

Example

If solver nstep > indexing, lowest_xest is added to trajectory.
Only if nothing was added to the trajectory, lowest_xest is added.
Which means that the trajectory sometimes contains the best fixed-point estimate lowest_xest and sometimes not?

Scenario 1: indexing=[8], nstep=5 -> trajectory contains fp_5
Scenario 2: indexing=[8], nstep=10 -> trajectory contains fp_8
Shouldn't the trajectory contain [fp_5, fp_8] (assuming fp_8 is the better estimate)?

Note that indexing defaults to indexing=[f_max_iter] if not specified otherwise and the best fixed-point estimate is added to the trajectory. So the problem only arises if one specifies indexing or n_states, e.g. to implement the fixed-point correction loss.
It is also not a problem in DEQSliced

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