Labo gradient projeté fini - #2
Open
dawutesse1 wants to merge 6 commits into
Open
dawutesse1 wants to merge 6 commits into
dawutesse1 wants to merge 6 commits into
Conversation
dpo
reviewed
Aug 18, 2025
dpo
reviewed
Aug 18, 2025
|
Status: |
dpo
reviewed
Aug 19, 2025
| - name: Votre nom | ||
| email: votre.adresse@polymtl.ca | ||
| - name: Dawut Esse | ||
| email: dawut.esse@etud.polymtl.ca |
| x::V; | ||
| t::Real = one(eltype(x)), | ||
| τ::Real = 0.5, | ||
| α₀::Real = one(eltype(x))) where V<:AbstractVector |
Contributor
There was a problem hiding this comment.
Ce n'est pas le prototype vu en laboratoire.
|
|
||
| α *= τ | ||
| if α < eps(eltype(α)) | ||
| return α |
| @info @sprintf("it=%3d f=%+.12f ||d||=%.3e", k, fx, nd) | ||
|
|
||
| # 2) critère d’arrêt | ||
| if norm(d) ≤ max(ϵa, ϵr * norm(x)) |
Contributor
There was a problem hiding this comment.
Tu calcules norm(d) plusieurs fois.
|
|
||
| ```{julia} | ||
| # votre code ici | ||
| using OptimizationProblems, OptimizationProblems.ADNLPProblems |
Contributor
There was a problem hiding this comment.
Ne pas me montrer la sortie de cette cellule.
| end | ||
| ``` | ||
|
|
||
| IPOPT > gradient projeté sur HS110, HS45, HS38 : plus rapide, plus robuste, meilleure stationnarité atteinte. |
Contributor
There was a problem hiding this comment.
Où est la comparaison des solutions ? Je ne vais pas lire les 102 pages de sortie. Pourquoi le gp s'est-il arrêté sur hs45 ?
| normd = norm(d) | ||
| normd > C.r && ( x .= C.a .+ (C.r / normd) .* d ) | ||
| return x | ||
| end |
| τ=0.5) | ||
| ``` | ||
|
|
||
| Oui : prendre la direction du gradient descendant −g, projeter le pas sur la boule de rayon Δ et choisir une longueur de pas qui réduit le modèle donne le pas de Cauchy — un pas faisable qui garantit une baisse minimale suffisante pour une méthode de région de confiance (donc c’est valide pour accepter/rejeter et mettre à jour Δ). Par contre, ce projected gradient ne “voit” pas la courbure négative, donc il est souvent plus conservateur (moins efficace) que des méthodes dédiées comme le CG tronqué ; bref, ça marche pour TR, mais c’est moins performant qu’un solveur qui exploite la courbure. No newline at end of file |
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.
No description provided.