FindMinimum: How can I know which method Mathematica has used?

The name of the pictureThe name of the pictureThe name of the pictureClash Royale CLAN TAG#URR8PPP











up vote
6
down vote

favorite












I have been using FindMinimum to find a local minimum of a non-linear function within a constrained region.



How can I know which method Mathematica has selected to find the local minimum?



Thanks in advance!










share|improve this question





















  • Unfortunately, the practical answer is that you can't really find that out easily. However, you can specify which method to use. If you need to know what method is being used, I suggest you select the method yourself. There is a lot of helpful information on how to control methods in this tutorial: reference.wolfram.com/language/tutorial/…
    – Szabolcs
    Sep 5 at 12:23















up vote
6
down vote

favorite












I have been using FindMinimum to find a local minimum of a non-linear function within a constrained region.



How can I know which method Mathematica has selected to find the local minimum?



Thanks in advance!










share|improve this question





















  • Unfortunately, the practical answer is that you can't really find that out easily. However, you can specify which method to use. If you need to know what method is being used, I suggest you select the method yourself. There is a lot of helpful information on how to control methods in this tutorial: reference.wolfram.com/language/tutorial/…
    – Szabolcs
    Sep 5 at 12:23













up vote
6
down vote

favorite









up vote
6
down vote

favorite











I have been using FindMinimum to find a local minimum of a non-linear function within a constrained region.



How can I know which method Mathematica has selected to find the local minimum?



Thanks in advance!










share|improve this question













I have been using FindMinimum to find a local minimum of a non-linear function within a constrained region.



How can I know which method Mathematica has selected to find the local minimum?



Thanks in advance!







mathematical-optimization






share|improve this question













share|improve this question











share|improve this question




share|improve this question










asked Sep 5 at 11:52









Maria

311




311











  • Unfortunately, the practical answer is that you can't really find that out easily. However, you can specify which method to use. If you need to know what method is being used, I suggest you select the method yourself. There is a lot of helpful information on how to control methods in this tutorial: reference.wolfram.com/language/tutorial/…
    – Szabolcs
    Sep 5 at 12:23

















  • Unfortunately, the practical answer is that you can't really find that out easily. However, you can specify which method to use. If you need to know what method is being used, I suggest you select the method yourself. There is a lot of helpful information on how to control methods in this tutorial: reference.wolfram.com/language/tutorial/…
    – Szabolcs
    Sep 5 at 12:23
















Unfortunately, the practical answer is that you can't really find that out easily. However, you can specify which method to use. If you need to know what method is being used, I suggest you select the method yourself. There is a lot of helpful information on how to control methods in this tutorial: reference.wolfram.com/language/tutorial/…
– Szabolcs
Sep 5 at 12:23





Unfortunately, the practical answer is that you can't really find that out easily. However, you can specify which method to use. If you need to know what method is being used, I suggest you select the method yourself. There is a lot of helpful information on how to control methods in this tutorial: reference.wolfram.com/language/tutorial/…
– Szabolcs
Sep 5 at 12:23











2 Answers
2






active

oldest

votes

















up vote
8
down vote













Excerpt from Some Notes on Internal Implementation of Mathematica:




  • With Method->Automatic and two starting values, FindMinimum uses
    Brent's principal axis method. With one starting value for each
    variable, FindMinimum uses BFGS quasi-Newton methods, with a limited
    memory variant for large systems.

  • If the function to be minimized
    is a sum of squares, FindMinimum uses the Levenberg–Marquardt method
    (Method->"LevenbergMarquardt").

  • With constraints, FindMinimum uses
    interior point methods.






share|improve this answer




















  • Thank you. The problem is that I have a value for each variable and I have constraints, so I guess it uses interior point methods. Is there any way to know which one ? I need to know the exact method, since I have to report the method used.
    – Maria
    Sep 5 at 12:07










  • There is a description of the Interior Point algorithm given on the reference side: reference.wolfram.com/language/tutorial/…
    – Julien Kluge
    Sep 5 at 12:15

















up vote
5
down vote













Select the Method that produces the SameQ result as Automatic



Select[#, 
FindMinimum[Abs[x + 1] + Abs[x + 1.01] + Abs[y + 1], x, y,
Method -> #] // Quiet & /@ "Gradient", "ConjugateGradient",
"InteriorPoint", "QuasiNewton", "Newton", "LinearProgramming",
"QuadraticProgramming", "LevenbergMarquardt", #[[2]] ==
FindMinimum[Abs[x + 1] + Abs[x + 1.01] + Abs[y + 1], x, y,
Method -> Automatic] &] // Quiet

(* "QuasiNewton", 0.01, x -> -1.00683, y -> -1. *)





share|improve this answer




















  • Thanks! I just used your code and got the empty set. I just replaced your function by mine and added the constraints and the initial point.
    – Maria
    Sep 5 at 14:58











  • @Maria - Without your function, constraints, and initial point, I cannot tell you what is going on. Recommend that you edit your question to include this information. Assuming that some random number is needed in the method used, you would need to use SeedRandom to force the same random number.
    – Bob Hanlon
    Sep 5 at 15:18











Your Answer




StackExchange.ifUsing("editor", function ()
return StackExchange.using("mathjaxEditing", function ()
StackExchange.MarkdownEditor.creationCallbacks.add(function (editor, postfix)
StackExchange.mathjaxEditing.prepareWmdForMathJax(editor, postfix, [["$", "$"], ["\\(","\\)"]]);
);
);
, "mathjax-editing");

StackExchange.ready(function()
var channelOptions =
tags: "".split(" "),
id: "387"
;
initTagRenderer("".split(" "), "".split(" "), channelOptions);

StackExchange.using("externalEditor", function()
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled)
StackExchange.using("snippets", function()
createEditor();
);

else
createEditor();

);

function createEditor()
StackExchange.prepareEditor(
heartbeatType: 'answer',
convertImagesToLinks: false,
noModals: false,
showLowRepImageUploadWarning: true,
reputationToPostImages: null,
bindNavPrevention: true,
postfix: "",
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
);



);













 

draft saved


draft discarded


















StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fmathematica.stackexchange.com%2fquestions%2f181266%2ffindminimum-how-can-i-know-which-method-mathematica-has-used%23new-answer', 'question_page');

);

Post as a guest






























2 Answers
2






active

oldest

votes








2 Answers
2






active

oldest

votes









active

oldest

votes






active

oldest

votes








up vote
8
down vote













Excerpt from Some Notes on Internal Implementation of Mathematica:




  • With Method->Automatic and two starting values, FindMinimum uses
    Brent's principal axis method. With one starting value for each
    variable, FindMinimum uses BFGS quasi-Newton methods, with a limited
    memory variant for large systems.

  • If the function to be minimized
    is a sum of squares, FindMinimum uses the Levenberg–Marquardt method
    (Method->"LevenbergMarquardt").

  • With constraints, FindMinimum uses
    interior point methods.






share|improve this answer




















  • Thank you. The problem is that I have a value for each variable and I have constraints, so I guess it uses interior point methods. Is there any way to know which one ? I need to know the exact method, since I have to report the method used.
    – Maria
    Sep 5 at 12:07










  • There is a description of the Interior Point algorithm given on the reference side: reference.wolfram.com/language/tutorial/…
    – Julien Kluge
    Sep 5 at 12:15














up vote
8
down vote













Excerpt from Some Notes on Internal Implementation of Mathematica:




  • With Method->Automatic and two starting values, FindMinimum uses
    Brent's principal axis method. With one starting value for each
    variable, FindMinimum uses BFGS quasi-Newton methods, with a limited
    memory variant for large systems.

  • If the function to be minimized
    is a sum of squares, FindMinimum uses the Levenberg–Marquardt method
    (Method->"LevenbergMarquardt").

  • With constraints, FindMinimum uses
    interior point methods.






share|improve this answer




















  • Thank you. The problem is that I have a value for each variable and I have constraints, so I guess it uses interior point methods. Is there any way to know which one ? I need to know the exact method, since I have to report the method used.
    – Maria
    Sep 5 at 12:07










  • There is a description of the Interior Point algorithm given on the reference side: reference.wolfram.com/language/tutorial/…
    – Julien Kluge
    Sep 5 at 12:15












up vote
8
down vote










up vote
8
down vote









Excerpt from Some Notes on Internal Implementation of Mathematica:




  • With Method->Automatic and two starting values, FindMinimum uses
    Brent's principal axis method. With one starting value for each
    variable, FindMinimum uses BFGS quasi-Newton methods, with a limited
    memory variant for large systems.

  • If the function to be minimized
    is a sum of squares, FindMinimum uses the Levenberg–Marquardt method
    (Method->"LevenbergMarquardt").

  • With constraints, FindMinimum uses
    interior point methods.






share|improve this answer












Excerpt from Some Notes on Internal Implementation of Mathematica:




  • With Method->Automatic and two starting values, FindMinimum uses
    Brent's principal axis method. With one starting value for each
    variable, FindMinimum uses BFGS quasi-Newton methods, with a limited
    memory variant for large systems.

  • If the function to be minimized
    is a sum of squares, FindMinimum uses the Levenberg–Marquardt method
    (Method->"LevenbergMarquardt").

  • With constraints, FindMinimum uses
    interior point methods.







share|improve this answer












share|improve this answer



share|improve this answer










answered Sep 5 at 12:03









Julien Kluge

3,62611124




3,62611124











  • Thank you. The problem is that I have a value for each variable and I have constraints, so I guess it uses interior point methods. Is there any way to know which one ? I need to know the exact method, since I have to report the method used.
    – Maria
    Sep 5 at 12:07










  • There is a description of the Interior Point algorithm given on the reference side: reference.wolfram.com/language/tutorial/…
    – Julien Kluge
    Sep 5 at 12:15
















  • Thank you. The problem is that I have a value for each variable and I have constraints, so I guess it uses interior point methods. Is there any way to know which one ? I need to know the exact method, since I have to report the method used.
    – Maria
    Sep 5 at 12:07










  • There is a description of the Interior Point algorithm given on the reference side: reference.wolfram.com/language/tutorial/…
    – Julien Kluge
    Sep 5 at 12:15















Thank you. The problem is that I have a value for each variable and I have constraints, so I guess it uses interior point methods. Is there any way to know which one ? I need to know the exact method, since I have to report the method used.
– Maria
Sep 5 at 12:07




Thank you. The problem is that I have a value for each variable and I have constraints, so I guess it uses interior point methods. Is there any way to know which one ? I need to know the exact method, since I have to report the method used.
– Maria
Sep 5 at 12:07












There is a description of the Interior Point algorithm given on the reference side: reference.wolfram.com/language/tutorial/…
– Julien Kluge
Sep 5 at 12:15




There is a description of the Interior Point algorithm given on the reference side: reference.wolfram.com/language/tutorial/…
– Julien Kluge
Sep 5 at 12:15










up vote
5
down vote













Select the Method that produces the SameQ result as Automatic



Select[#, 
FindMinimum[Abs[x + 1] + Abs[x + 1.01] + Abs[y + 1], x, y,
Method -> #] // Quiet & /@ "Gradient", "ConjugateGradient",
"InteriorPoint", "QuasiNewton", "Newton", "LinearProgramming",
"QuadraticProgramming", "LevenbergMarquardt", #[[2]] ==
FindMinimum[Abs[x + 1] + Abs[x + 1.01] + Abs[y + 1], x, y,
Method -> Automatic] &] // Quiet

(* "QuasiNewton", 0.01, x -> -1.00683, y -> -1. *)





share|improve this answer




















  • Thanks! I just used your code and got the empty set. I just replaced your function by mine and added the constraints and the initial point.
    – Maria
    Sep 5 at 14:58











  • @Maria - Without your function, constraints, and initial point, I cannot tell you what is going on. Recommend that you edit your question to include this information. Assuming that some random number is needed in the method used, you would need to use SeedRandom to force the same random number.
    – Bob Hanlon
    Sep 5 at 15:18















up vote
5
down vote













Select the Method that produces the SameQ result as Automatic



Select[#, 
FindMinimum[Abs[x + 1] + Abs[x + 1.01] + Abs[y + 1], x, y,
Method -> #] // Quiet & /@ "Gradient", "ConjugateGradient",
"InteriorPoint", "QuasiNewton", "Newton", "LinearProgramming",
"QuadraticProgramming", "LevenbergMarquardt", #[[2]] ==
FindMinimum[Abs[x + 1] + Abs[x + 1.01] + Abs[y + 1], x, y,
Method -> Automatic] &] // Quiet

(* "QuasiNewton", 0.01, x -> -1.00683, y -> -1. *)





share|improve this answer




















  • Thanks! I just used your code and got the empty set. I just replaced your function by mine and added the constraints and the initial point.
    – Maria
    Sep 5 at 14:58











  • @Maria - Without your function, constraints, and initial point, I cannot tell you what is going on. Recommend that you edit your question to include this information. Assuming that some random number is needed in the method used, you would need to use SeedRandom to force the same random number.
    – Bob Hanlon
    Sep 5 at 15:18













up vote
5
down vote










up vote
5
down vote









Select the Method that produces the SameQ result as Automatic



Select[#, 
FindMinimum[Abs[x + 1] + Abs[x + 1.01] + Abs[y + 1], x, y,
Method -> #] // Quiet & /@ "Gradient", "ConjugateGradient",
"InteriorPoint", "QuasiNewton", "Newton", "LinearProgramming",
"QuadraticProgramming", "LevenbergMarquardt", #[[2]] ==
FindMinimum[Abs[x + 1] + Abs[x + 1.01] + Abs[y + 1], x, y,
Method -> Automatic] &] // Quiet

(* "QuasiNewton", 0.01, x -> -1.00683, y -> -1. *)





share|improve this answer












Select the Method that produces the SameQ result as Automatic



Select[#, 
FindMinimum[Abs[x + 1] + Abs[x + 1.01] + Abs[y + 1], x, y,
Method -> #] // Quiet & /@ "Gradient", "ConjugateGradient",
"InteriorPoint", "QuasiNewton", "Newton", "LinearProgramming",
"QuadraticProgramming", "LevenbergMarquardt", #[[2]] ==
FindMinimum[Abs[x + 1] + Abs[x + 1.01] + Abs[y + 1], x, y,
Method -> Automatic] &] // Quiet

(* "QuasiNewton", 0.01, x -> -1.00683, y -> -1. *)






share|improve this answer












share|improve this answer



share|improve this answer










answered Sep 5 at 13:21









Bob Hanlon

55.7k23589




55.7k23589











  • Thanks! I just used your code and got the empty set. I just replaced your function by mine and added the constraints and the initial point.
    – Maria
    Sep 5 at 14:58











  • @Maria - Without your function, constraints, and initial point, I cannot tell you what is going on. Recommend that you edit your question to include this information. Assuming that some random number is needed in the method used, you would need to use SeedRandom to force the same random number.
    – Bob Hanlon
    Sep 5 at 15:18

















  • Thanks! I just used your code and got the empty set. I just replaced your function by mine and added the constraints and the initial point.
    – Maria
    Sep 5 at 14:58











  • @Maria - Without your function, constraints, and initial point, I cannot tell you what is going on. Recommend that you edit your question to include this information. Assuming that some random number is needed in the method used, you would need to use SeedRandom to force the same random number.
    – Bob Hanlon
    Sep 5 at 15:18
















Thanks! I just used your code and got the empty set. I just replaced your function by mine and added the constraints and the initial point.
– Maria
Sep 5 at 14:58





Thanks! I just used your code and got the empty set. I just replaced your function by mine and added the constraints and the initial point.
– Maria
Sep 5 at 14:58













@Maria - Without your function, constraints, and initial point, I cannot tell you what is going on. Recommend that you edit your question to include this information. Assuming that some random number is needed in the method used, you would need to use SeedRandom to force the same random number.
– Bob Hanlon
Sep 5 at 15:18





@Maria - Without your function, constraints, and initial point, I cannot tell you what is going on. Recommend that you edit your question to include this information. Assuming that some random number is needed in the method used, you would need to use SeedRandom to force the same random number.
– Bob Hanlon
Sep 5 at 15:18


















 

draft saved


draft discarded















































 


draft saved


draft discarded














StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fmathematica.stackexchange.com%2fquestions%2f181266%2ffindminimum-how-can-i-know-which-method-mathematica-has-used%23new-answer', 'question_page');

);

Post as a guest













































































Popular posts from this blog

How to check contact read email or not when send email to Individual?

Displaying single band from multi-band raster using QGIS

How many registers does an x86_64 CPU actually have?