<?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: Optimization of function, not a model in SAS/IML Software and Matrix Computations</title>
    <link>https://communities.sas.com/t5/SAS-IML-Software-and-Matrix/Optimization-of-function-not-a-model/m-p/444104#M4070</link>
    <description>You want P be maximize or minimize or a constant value.
All these could be done vi</description>
    <pubDate>Fri, 09 Mar 2018 14:18:45 GMT</pubDate>
    <dc:creator>Ksharp</dc:creator>
    <dc:date>2018-03-09T14:18:45Z</dc:date>
    <item>
      <title>Optimization of function, not a model</title>
      <link>https://communities.sas.com/t5/SAS-IML-Software-and-Matrix/Optimization-of-function-not-a-model/m-p/444067#M4069</link>
      <description>&lt;P&gt;Hi!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I've found a model that I want to recreate for my masters thesis but the procedure is very imprecise. Essentially what I want is to find the implied probability (p) that is needed for a model to produce a certain outcome (A). In other words i want to send in some p&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;p = a*x + b*y where a and b are known.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;So the optimization would roughly be:&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;1. Chose x and y&lt;/P&gt;&lt;P&gt;2. Calculate p and insert into the model&lt;/P&gt;&lt;P&gt;3. Compare result with desired outcome A&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The authors just state that they use a grid search (something which i'm not familiar with) to achieve this and nothing more.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;My main question is: is it possible to optimize a model like this when I'm&amp;nbsp;treating the model itself as a "black box". Since the model is fairly complicated i think that if it is not possible I would try to "manually" produce code that tries a number of combinations of x and y and find the best fitted pair... although i'd prefer if there was a more elegant and simple way to achieve this.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I'm using SAS/IML.&lt;/P&gt;</description>
      <pubDate>Fri, 09 Mar 2018 13:16:15 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-IML-Software-and-Matrix/Optimization-of-function-not-a-model/m-p/444067#M4069</guid>
      <dc:creator>jan_t_lagen</dc:creator>
      <dc:date>2018-03-09T13:16:15Z</dc:date>
    </item>
    <item>
      <title>Re: Optimization of function, not a model</title>
      <link>https://communities.sas.com/t5/SAS-IML-Software-and-Matrix/Optimization-of-function-not-a-model/m-p/444104#M4070</link>
      <description>You want P be maximize or minimize or a constant value.
All these could be done vi</description>
      <pubDate>Fri, 09 Mar 2018 14:18:45 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-IML-Software-and-Matrix/Optimization-of-function-not-a-model/m-p/444104#M4070</guid>
      <dc:creator>Ksharp</dc:creator>
      <dc:date>2018-03-09T14:18:45Z</dc:date>
    </item>
    <item>
      <title>Re: Optimization of function, not a model</title>
      <link>https://communities.sas.com/t5/SAS-IML-Software-and-Matrix/Optimization-of-function-not-a-model/m-p/444145#M4071</link>
      <description>&lt;P&gt;Yes, you can do this. Optimization methods don't care how the objective function is computed, and IML will compute numerical&amp;nbsp;derivatives for you for any Newton-type optimizations.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Two issues that you might encounter:&lt;/P&gt;
&lt;P&gt;1. In your example, p is the probability&amp;nbsp;that depends on a and b. You will need to set constraints on a and b so that 0&amp;lt; p &amp;lt;1.&lt;/P&gt;
&lt;P&gt;2. You don't seem to have any randomness (for example, a regression model with "noise"), but if&amp;nbsp;the&amp;nbsp;objective function is stochastic then the optimization algorithm will get close to the optimal value but then will "bounce around" because of the random terms.solution.)&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Some articles for you to read:&lt;/P&gt;
&lt;P&gt;&lt;A href="https://blogs.sas.com/content/iml/2011/10/12/maximum-likelihood-estimation-in-sasiml.html" target="_self"&gt;Maximum likelihood estimation in SAS/IML&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&lt;A href="https://blogs.sas.com/content/iml/2014/03/05/optimizing-a-function-that-evaluates-an-integral.html" target="_self"&gt;Optimizing a function that evaluates an integral&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&lt;A href="https://blogs.sas.com/content/iml/2014/03/12/optimizing-a-function-of-an-integral.html" target="_self"&gt;Optimizing a function of an integral&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 09 Mar 2018 14:50:27 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-IML-Software-and-Matrix/Optimization-of-function-not-a-model/m-p/444145#M4071</guid>
      <dc:creator>Rick_SAS</dc:creator>
      <dc:date>2018-03-09T14:50:27Z</dc:date>
    </item>
    <item>
      <title>Re: Optimization of function, not a model</title>
      <link>https://communities.sas.com/t5/SAS-IML-Software-and-Matrix/Optimization-of-function-not-a-model/m-p/446769#M4081</link>
      <description>&lt;P&gt;Quick follow up question: is there a way to specify the number of iterations using "nlpnra"? I couldn't find any examples of it on the SAS forums.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;It's not of great importance for me to get a perfect optimization so i would like to so how good it gets after a few step. further as there are some randomness in my objective function i fear this might make it hard to find a "perfect optimal solution"&lt;/P&gt;</description>
      <pubDate>Mon, 19 Mar 2018 13:53:18 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-IML-Software-and-Matrix/Optimization-of-function-not-a-model/m-p/446769#M4081</guid>
      <dc:creator>jan_t_lagen</dc:creator>
      <dc:date>2018-03-19T13:53:18Z</dc:date>
    </item>
    <item>
      <title>Re: Optimization of function, not a model</title>
      <link>https://communities.sas.com/t5/SAS-IML-Software-and-Matrix/Optimization-of-function-not-a-model/m-p/448807#M4090</link>
      <description>&lt;P&gt;Yes. By default, NLPNRA iterates as many as 200 times, but you can &lt;A href="http://go.documentation.sas.com/?docsetId=imlug&amp;amp;docsetTarget=imlug_nonlinearoptexpls_sect019.htm&amp;amp;docsetVersion=14.3&amp;amp;locale=en" target="_self"&gt;set the first element of the termination criteria vector&lt;/A&gt; to a smaller value, such as 25. (tc[1]=25)&lt;/P&gt;</description>
      <pubDate>Mon, 26 Mar 2018 20:40:47 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-IML-Software-and-Matrix/Optimization-of-function-not-a-model/m-p/448807#M4090</guid>
      <dc:creator>Rick_SAS</dc:creator>
      <dc:date>2018-03-26T20:40:47Z</dc:date>
    </item>
  </channel>
</rss>

