Calculate critical curves using JAX#207
Merged
CKrawczyk merged 1 commit intofeature/jax_wrapperfrom Nov 4, 2024
Merged
Conversation
This overhauls the current critical curve method from a grid search to an application of Newton's method for zero finding. The steps are as follows: 1) Create a set of `n_points` initial points in a circle of radius `init_r` and centred on `init_centre` 2) Apply `n_steps` of Newton's method to these points in the "radial" direction only (i.e. keeping angle fixed). Jax's auto differentiation is used to find the radial derivatives of the eigen value function for this step. 3) Filter the results and only keep point that have their eigen value `threshold` of 0. This step is needed because Newton's method will fail when the radial derivative is equal to zero (i.e. near a max or min of the eigen value). No underlying grid is needed for this method, but the quality of the results are dependent on the initial circle of points. For best results the circle should be drawn around *each* max/min of the eigen value function. This is typically the centre of each mass in the profile.
Jammy2211
approved these changes
Nov 4, 2024
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This overhauls the current critical curve method from a grid search to an application of Newton's method for zero finding.
The steps are as follows:
Create a set of
n_pointsinitial points in a circle of radiusinit_rand centred oninit_centreApply
n_stepsof Newton's method to these points in the "radial" direction only (i.e. keeping the angle fixed). Jax's auto differentiation is used to find the radial derivatives of the eigenvalue function for this step.Filter the results and only keep points that have their eigenvalue
thresholdof 0. This step is needed because Newton's method will fail when the radial derivative is equal to zero (i.e. near a max or min of the eigenvalue).No underlying grid is needed for this method, but the quality of the results are dependent on the initial circle of points. For best results, the circle should be drawn around each max/min of the eigenvalue function. This is typically the centre of each mass in the profile.