Effacer les filtres
Effacer les filtres

Info

Cette question est clôturée. Rouvrir pour modifier ou répondre.

Why do the elements of my user-provided numerical Jacobian seem to change when compared with Matlab's using the 'DerivativeCheck' option?

1 vue (au cours des 30 derniers jours)
I am using fmincon to solve a constrained optimisation problem.
My problem involves 8900 design variables and has 5846 non-linear equality constraints (0 linear equality, 0 linear inequality and 0 non-linear inequality constraints). The non-linear equality constraints Jacobian has a known sparsity pattern which I am trying to exploit (avoid unnecessary computations to be performed by Matlab), and I am trying to numerically compute each of the terms using forward differences.
The non-linear equality constraints Jacobian has the following dimensions (5846 x 8900).
I am now in the process of checking my user-supplied Jacobian with that computed via Matlab through fmincon (fmincon options, 'DerivativeCheck','on').
I have performed the 'check' multiple times, and whilst my derivatives do not match exactly, the differences are small as indicated below:
(8885,2566)
user: -1.48538
matlab: -1.48454
diff: 0.000564995
(8882,3898)
user: -2.13046
matlab: -2.1299
diff: 0.000263211
(8885,2714)
user: -0.469954
matlab: -0.470041
diff: 8.7738e-05
(8888,4934)
user: -0.876923
matlab: -0.877136
diff: 0.000213623
(8885,2640)
user: 0.61372
matlab: 0.613775
diff: 0.00050354
(8888,4934)
user: -0.342921
matlab: -0.343118
diff: 0.000196457
In some instances when I have checked the derivatives, my user-supplied value for element (8885,4900), for example, differs between instances when I run the function - I do not make changes to the values of the design variables.
Can someone please explain why I am noticing these differences in my own user-supplied Jacobian?
Kind regards,
Nicos Haralabidis

Réponses (0)

Cette question est clôturée.

Produits


Version

R2016b

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by