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

Add Hessian check for 2-parameter problems #363

Merged
merged 36 commits into from
Dec 20, 2024
Merged
Changes from 1 commit
Commits
Show all changes
36 commits
Select commit Hold shift + click to select a range
4cb590c
Add Hessian check
NicolaCourtier Jun 14, 2024
2f5546a
Merge branch 'develop' into 362-Hessian-check
NicolaCourtier Jul 5, 2024
7dfe8df
Update test_classification.py
NicolaCourtier Jul 5, 2024
dcb05e3
Merge branch 'develop' into 362-Hessian-check
NicolaCourtier Jul 11, 2024
f15a2e5
Update to implicitly concatenated strings
NicolaCourtier Jul 11, 2024
1e465b1
Merge branch 'develop' into 362-Hessian-check
NicolaCourtier Jul 23, 2024
d857a7f
Merge branch 'develop' into 362-Hessian-check
NicolaCourtier Aug 1, 2024
1687e11
Merge branch 'develop' into 362-Hessian-check
NicolaCourtier Aug 22, 2024
9abb814
Merge branch 'develop' into 362-Hessian-check
NicolaCourtier Sep 18, 2024
acbb460
Merge branch 'develop' into 362-Hessian-check
NicolaCourtier Sep 18, 2024
7e01c8d
Merge branch 'develop' into 362-Hessian-check
NicolaCourtier Oct 11, 2024
21b6c77
Merge branch 'develop' into 362-Hessian-check
NicolaCourtier Nov 18, 2024
6004bd3
Merge branch 'develop' into 362-Hessian-check
NicolaCourtier Nov 20, 2024
2caf175
Merge branch 'develop' into 362-Hessian-check
NicolaCourtier Dec 5, 2024
3845313
Update test_classification
NicolaCourtier Dec 5, 2024
7dec246
Add tests on insensitivity
NicolaCourtier Dec 6, 2024
3dbf32f
Merge branch 'develop' into 362-Hessian-check
NicolaCourtier Dec 6, 2024
a8ab96b
Rename x_range
NicolaCourtier Dec 6, 2024
dcdb410
Update CHANGELOG.md
NicolaCourtier Dec 6, 2024
bdce4a8
Merge branch 'develop' into 362-Hessian-check
NicolaCourtier Dec 6, 2024
94be059
Remove print(eigr)
NicolaCourtier Dec 6, 2024
e2198a9
Merge branch 'develop' into 362-Hessian-check
NicolaCourtier Dec 6, 2024
7f1fea2
Merge branch 'develop' into 362-Hessian-check
NicolaCourtier Dec 6, 2024
b2d59ff
Merge branch 'develop' into 362-Hessian-check
NicolaCourtier Dec 17, 2024
53f0100
Fix typo
NicolaCourtier Dec 17, 2024
d61c77a
Remove print
NicolaCourtier Dec 17, 2024
2525716
Update input to OptimisationResult
NicolaCourtier Dec 18, 2024
55bad4c
Improve insensitivity tests
NicolaCourtier Dec 18, 2024
cc3dc84
Improve correlation checks
NicolaCourtier Dec 18, 2024
083f4a9
Merge branch 'develop' into 362-Hessian-check
NicolaCourtier Dec 18, 2024
e9c35bf
Update in line with OptimisationResult
NicolaCourtier Dec 18, 2024
c8ac039
Make one test a unit test
NicolaCourtier Dec 19, 2024
6ed9ab3
style: pre-commit fixes
pre-commit-ci[bot] Dec 19, 2024
14e00a2
Rename test file
NicolaCourtier Dec 19, 2024
c1c60ff
Update function name
NicolaCourtier Dec 20, 2024
bac1082
Check bounds proximity if infinite cost
NicolaCourtier Dec 20, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Remove print(eigr)
  • Loading branch information
NicolaCourtier authored Dec 6, 2024
commit 94be05910f2a61eae9c1a9d86dcea85de66a4c9c
1 change: 0 additions & 1 deletion pybop/_classification.py
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,6 @@
# Compute the eigenvalues, returned in ascending order
eigr = np.linalg.eigh(cfd_hessian)
eigenvalues = eigr.eigenvalues
print(eigr)

# Classify the result
cost_tolerance = epsilon**2 * final_cost
Expand All @@ -102,7 +101,7 @@
elif np.all(eigenvalues < -cost_tolerance):
message = "The optimiser has located a maximum."
elif np.all(np.abs(eigenvalues) > cost_tolerance):
message = "The optimiser has located a saddle point."

Check warning on line 104 in pybop/_classification.py

View check run for this annotation

Codecov / codecov/patch

pybop/_classification.py#L104

Added line #L104 was not covered by tests
else:
# At least one eigenvalue is too small to classify with certainty
if np.all(np.abs(eigenvalues) < cost_tolerance):
Expand Down
Loading