<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Minimzation function error: &amp;quot;Convergence FAILURE: CANNOT DECREASE OBJECTIVE FUNCTION&amp;quot; in Discussions</title>
    <link>https://community.jmp.com/t5/Discussions/Minimzation-function-error-quot-Convergence-FAILURE-CANNOT/m-p/357600#M60772</link>
    <description>&lt;P&gt;What is the Minimize() function call that you used? What is the expression to be evaluated? What are the parameters in the expression, and how are they initialized? Is there any more information available in the JMP Log when you call this function?&lt;/P&gt;</description>
    <pubDate>Tue, 09 Feb 2021 17:15:49 GMT</pubDate>
    <dc:creator>Mark_Bailey</dc:creator>
    <dc:date>2021-02-09T17:15:49Z</dc:date>
    <item>
      <title>Minimzation function error: "Convergence FAILURE: CANNOT DECREASE OBJECTIVE FUNCTION"</title>
      <link>https://community.jmp.com/t5/Discussions/Minimzation-function-error-quot-Convergence-FAILURE-CANNOT/m-p/357387#M60752</link>
      <description>&lt;P&gt;I am working on a project in JMP 16, where I use the “Minimize”-function. When running the function I often encounter the error “Convergence FAILURE: CANNOT DECREASE OBJECTIVE”. Looking at the final results of the script, they are as expected. It therefore seems that the error has little influence on the final results. However, to ensure the validity of the script, I would still like to know the reasoning behind the error.&amp;nbsp;I have had difficulties finding any documentation about this specific error, and therefore hoped someone in the JMP community could help identify the cause.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Using the “&amp;lt;&amp;lt; Details( Both )” option for the minimize function, below image of the log was obtained:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="LouisMeyer_0-1612869618628.jpeg" style="width: 400px;"&gt;&lt;img src="https://community.jmp.com/t5/image/serverpage/image-id/30116i19B4C537BD347165/image-size/medium?v=v2&amp;amp;px=400" role="button" title="LouisMeyer_0-1612869618628.jpeg" alt="LouisMeyer_0-1612869618628.jpeg" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Best regards,&lt;/P&gt;&lt;P&gt;Louis&lt;/P&gt;</description>
      <pubDate>Fri, 09 Jun 2023 22:05:44 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Minimzation-function-error-quot-Convergence-FAILURE-CANNOT/m-p/357387#M60752</guid>
      <dc:creator>LouisMeyer</dc:creator>
      <dc:date>2023-06-09T22:05:44Z</dc:date>
    </item>
    <item>
      <title>Re: Minimzation function error: "Convergence FAILURE: CANNOT DECREASE OBJECTIVE FUNCTION"</title>
      <link>https://community.jmp.com/t5/Discussions/Minimzation-function-error-quot-Convergence-FAILURE-CANNOT/m-p/357600#M60772</link>
      <description>&lt;P&gt;What is the Minimize() function call that you used? What is the expression to be evaluated? What are the parameters in the expression, and how are they initialized? Is there any more information available in the JMP Log when you call this function?&lt;/P&gt;</description>
      <pubDate>Tue, 09 Feb 2021 17:15:49 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Minimzation-function-error-quot-Convergence-FAILURE-CANNOT/m-p/357600#M60772</guid>
      <dc:creator>Mark_Bailey</dc:creator>
      <dc:date>2021-02-09T17:15:49Z</dc:date>
    </item>
    <item>
      <title>Re: Minimzation function error: "Convergence FAILURE: CANNOT DECREASE OBJECTIVE FUNCTION"</title>
      <link>https://community.jmp.com/t5/Discussions/Minimzation-function-error-quot-Convergence-FAILURE-CANNOT/m-p/358759#M60888</link>
      <description>&lt;P&gt;Hi Mark,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you for your response.&amp;nbsp;&lt;/P&gt;&lt;P&gt;To answer your questions:&lt;/P&gt;&lt;OL&gt;&lt;LI&gt;The minimize function call is as follows:&amp;nbsp;&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;minfun = Minimize (mfun, {df},&amp;lt;&amp;lt;UseNumericDeriv(True));&lt;/CODE&gt;&lt;/PRE&gt;&lt;/LI&gt;&lt;LI&gt;The expression to be evaluated is as follows:&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;mfun = Expr( Log10( (ChiSquare Quantile( alpha, df ) / df - Vratio) ^ 2 ) );&lt;/CODE&gt;&lt;/PRE&gt;&lt;/LI&gt;&lt;LI&gt;The parameters of the function are initilized as following:&lt;OL&gt;&lt;LI&gt;df: this is set to 2 before running the Minimize() function&amp;nbsp;&lt;/LI&gt;&lt;LI&gt;Both alpha and Vratio are calculated previously in the script. In the particular situation where it fails the parameters have the following values:&lt;OL&gt;&lt;LI&gt;alpha = 0.025&lt;/LI&gt;&lt;LI&gt;Vratio =&amp;nbsp; 0.39135&lt;/LI&gt;&lt;LI&gt;Here it can be added, that using Vratio = 0.94917 i do not encounter the warning.&lt;/LI&gt;&lt;/OL&gt;&lt;/LI&gt;&lt;/OL&gt;&lt;/LI&gt;&lt;/OL&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Best regards,&lt;/P&gt;&lt;P&gt;Louis&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sun, 14 Feb 2021 13:46:57 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Minimzation-function-error-quot-Convergence-FAILURE-CANNOT/m-p/358759#M60888</guid>
      <dc:creator>LouisMeyer</dc:creator>
      <dc:date>2021-02-14T13:46:57Z</dc:date>
    </item>
    <item>
      <title>Re: Minimzation function error: "Convergence FAILURE: CANNOT DECREASE OBJECTIVE FUNCTION"</title>
      <link>https://community.jmp.com/t5/Discussions/Minimzation-function-error-quot-Convergence-FAILURE-CANNOT/m-p/358762#M60891</link>
      <description>&lt;P&gt;I used this script based on your answers.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;Names Default to Here( 1 );

alpha = 0.025;
variance ratio = 0.94917 ;
df = 2;

expression = Expr( Log10( (Chi Square Quantile( alpha, df ) / df - variance ratio) ^ 2 ) );

Minimize( expression, { df( 2, 1000 ) }, &amp;lt;&amp;lt; Use Numeric Deriv( "true" ) );&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;I get the following using the two variance ratios that you gave to me:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;//:*/
Names Default to Here( 1 );

alpha = 0.025;
variance ratio = 0.39135;
df = 2;

expression = Expr( Log10( (Chi Square Quantile( alpha, df ) / df - variance ratio) ^ 2 ) );

Minimize( expression, { df( 2, 1000 ) }, &amp;lt;&amp;lt; Use Numeric Deriv( "true" ) );
/*:

Optimization failed: Failed: Cannot Decrease Objective Function

-19.6490758040614
//:*/
Names Default to Here( 1 );

alpha = 0.025;
variance ratio = 0.94917 ;
df = 2;

expression = Expr( Log10( (Chi Square Quantile( alpha, df ) / df - variance ratio) ^ 2 ) );

Minimize( expression, { df( 2, 1000 ) }, &amp;lt;&amp;lt; Use Numeric Deriv( "true" ) );
/*:

-2.91402948948765&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Sun, 14 Feb 2021 14:21:19 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Minimzation-function-error-quot-Convergence-FAILURE-CANNOT/m-p/358762#M60891</guid>
      <dc:creator>Mark_Bailey</dc:creator>
      <dc:date>2021-02-14T14:21:19Z</dc:date>
    </item>
    <item>
      <title>Re: Minimzation function error: "Convergence FAILURE: CANNOT DECREASE OBJECTIVE FUNCTION"</title>
      <link>https://community.jmp.com/t5/Discussions/Minimzation-function-error-quot-Convergence-FAILURE-CANNOT/m-p/358766#M60892</link>
      <description>&lt;P&gt;Looking at the Profiler for the function (see below, and the attached data table), it does look like Minimize() is giving a good answer.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Perhaps&amp;nbsp;&lt;a href="https://community.jmp.com/t5/user/viewprofilepage/user-id/23"&gt;@chris_gotwalt1&lt;/a&gt;&amp;nbsp;can give an explanation of the error message you're receiving from the call to Minimize().&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="2021-02-14_11-29-13.745.png" style="width: 400px;"&gt;&lt;img src="https://community.jmp.com/t5/image/serverpage/image-id/30220i7DCA86DEE58FB934/image-size/medium?v=v2&amp;amp;px=400" role="button" title="2021-02-14_11-29-13.745.png" alt="2021-02-14_11-29-13.745.png" /&gt;&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Sun, 14 Feb 2021 16:31:58 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Minimzation-function-error-quot-Convergence-FAILURE-CANNOT/m-p/358766#M60892</guid>
      <dc:creator>Jeff_Perkinson</dc:creator>
      <dc:date>2021-02-14T16:31:58Z</dc:date>
    </item>
    <item>
      <title>Re: Minimzation function error: "Convergence FAILURE: CANNOT DECREASE OBJECTIVE FUNCTION"</title>
      <link>https://community.jmp.com/t5/Discussions/Minimzation-function-error-quot-Convergence-FAILURE-CANNOT/m-p/358772#M60894</link>
      <description>&lt;P&gt;You could make a graph, like this:&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;expression=expr(Log10( (ChiSquare Quantile( alpha, df ) / df - Vratio) ^ 2 ));


alpha = 0.025;
Vratio =  0.39135;
df=2;
Minimize( expression, { df( 2, 1000 ) }, &amp;lt;&amp;lt; Use Numeric Deriv( "true" ) );

show(df);

New Window( "Example",
	Graph Box(xscale(-1,26),yscale(-10,0),
		Pen Color( "red" );
		Y Function( expression, df );
	)
);&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="there is a sharp drop at the df found by the minimize function." style="width: 387px;"&gt;&lt;img src="https://community.jmp.com/t5/image/serverpage/image-id/30221iF8F07D57749943B0/image-size/large?v=v2&amp;amp;px=999" role="button" title="capture1.png" alt="there is a sharp drop at the df found by the minimize function." /&gt;&lt;span class="lia-inline-image-caption" onclick="event.preventDefault();"&gt;there is a sharp drop at the df found by the minimize function.&lt;/span&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;you can zoom in on the sharp drop and see it is going to be computationally difficult to get a perfect answer:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="9 significant digits, and more to go." style="width: 387px;"&gt;&lt;img src="https://community.jmp.com/t5/image/serverpage/image-id/30222i49B23611A60C33DF/image-size/large?v=v2&amp;amp;px=999" role="button" title="capture2.png" alt="9 significant digits, and more to go." /&gt;&lt;span class="lia-inline-image-caption" onclick="event.preventDefault();"&gt;9 significant digits, and more to go.&lt;/span&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;minimize found&amp;nbsp;df = &lt;STRONG&gt;13.3517718809044&lt;/STRONG&gt;;&lt;/P&gt;&lt;P&gt;I'd &lt;EM&gt;guess&lt;/EM&gt;&amp;nbsp;that the minimize algorithm hits a point on the curve that finds the next point on the far side of the true minimum, and might even be in a cycle bouncing across the minimum. With a different starting value, it might get close enough to decide to stop. Close enough is also a parameter you can pass to minimize (tolerance).&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sun, 14 Feb 2021 19:26:38 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Minimzation-function-error-quot-Convergence-FAILURE-CANNOT/m-p/358772#M60894</guid>
      <dc:creator>Craige_Hales</dc:creator>
      <dc:date>2021-02-14T19:26:38Z</dc:date>
    </item>
  </channel>
</rss>

