<?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 Minimization of objective function with matrix in SAS/IML Software and Matrix Computations</title>
    <link>https://communities.sas.com/t5/SAS-IML-Software-and-Matrix/Minimization-of-objective-function-with-matrix/m-p/438511#M4025</link>
    <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I need to minimize this function A = w' * cov * w, where cov is my variance matrix 5x5 and w is my list of parameters i need to chose in order to minimize A so w is a vector 1x5.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have constraints where the sum of w = 1 and the parameters of w need to be between 0 and 1.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I tried several things but I am a bit lost on IML to do that, if somebody can help me, I have read the SAS IML User Guide with the routine function and some other topics but I didn't really understand completely how to suceed in order to solve my problem.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks you by advance.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Tue, 20 Feb 2018 16:41:17 GMT</pubDate>
    <dc:creator>degdeg</dc:creator>
    <dc:date>2018-02-20T16:41:17Z</dc:date>
    <item>
      <title>Minimization of objective function with matrix</title>
      <link>https://communities.sas.com/t5/SAS-IML-Software-and-Matrix/Minimization-of-objective-function-with-matrix/m-p/438511#M4025</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I need to minimize this function A = w' * cov * w, where cov is my variance matrix 5x5 and w is my list of parameters i need to chose in order to minimize A so w is a vector 1x5.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have constraints where the sum of w = 1 and the parameters of w need to be between 0 and 1.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I tried several things but I am a bit lost on IML to do that, if somebody can help me, I have read the SAS IML User Guide with the routine function and some other topics but I didn't really understand completely how to suceed in order to solve my problem.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks you by advance.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 20 Feb 2018 16:41:17 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-IML-Software-and-Matrix/Minimization-of-objective-function-with-matrix/m-p/438511#M4025</guid>
      <dc:creator>degdeg</dc:creator>
      <dc:date>2018-02-20T16:41:17Z</dc:date>
    </item>
    <item>
      <title>Re: Minimization of objective function with matrix</title>
      <link>https://communities.sas.com/t5/SAS-IML-Software-and-Matrix/Minimization-of-objective-function-with-matrix/m-p/438529#M4026</link>
      <description>&lt;P&gt;Q(w) = w`*A*w is a quadratic function of w. You can use the NLPQUA subroutine to solve this problem, including putting constraints on the parameters. See the article&lt;A href="https://blogs.sas.com/content/iml/2017/04/12/quadratic-optimization-sas.html" target="_self"&gt; "Quadratic optimization in SAS"&lt;/A&gt; for an example and discussion.&lt;/P&gt;</description>
      <pubDate>Tue, 20 Feb 2018 00:39:42 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-IML-Software-and-Matrix/Minimization-of-objective-function-with-matrix/m-p/438529#M4026</guid>
      <dc:creator>Rick_SAS</dc:creator>
      <dc:date>2018-02-20T00:39:42Z</dc:date>
    </item>
    <item>
      <title>Re: Minimization of objective function with matrix</title>
      <link>https://communities.sas.com/t5/SAS-IML-Software-and-Matrix/Minimization-of-objective-function-with-matrix/m-p/438737#M4027</link>
      <description>&lt;P&gt;Thanks you !&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;So I tried this :&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;w = J(5,1,0.2);&lt;BR /&gt;con = {0 0 0 0 0 . . ,&lt;BR /&gt;1 1 1 1 1 . . ,&lt;BR /&gt;1 1 1 1 1 0 1};&lt;BR /&gt;opt = {0 2};&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;CALL NLPQUA(rc,wres,nccov,w,opt,con);&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;And it worked but I'm not sure If it gives me the right wres vector solution of the minimization of w'*A*w where A is nccov.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Instead it gives me the minimization of 0.5*w'*A*w I think, isn't it ?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks you again by advance.&lt;/P&gt;</description>
      <pubDate>Tue, 20 Feb 2018 17:46:05 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-IML-Software-and-Matrix/Minimization-of-objective-function-with-matrix/m-p/438737#M4027</guid>
      <dc:creator>degdeg</dc:creator>
      <dc:date>2018-02-20T17:46:05Z</dc:date>
    </item>
    <item>
      <title>Re: Minimization of objective function with matrix</title>
      <link>https://communities.sas.com/t5/SAS-IML-Software-and-Matrix/Minimization-of-objective-function-with-matrix/m-p/438783#M4028</link>
      <description>&lt;P&gt;&amp;nbsp;If&amp;nbsp;w* is the value that minimizes&amp;nbsp;w`*A*w, then w* also minimizes alpha * w`*A*w for all alpha &amp;gt; 0.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If you think back to calculus, you might remember the 1-D analogy: the value of x that minimizes 3(x-2)^2 also minimizes alpha 3&lt;SPAN&gt;(x-2)^2&amp;nbsp;&lt;/SPAN&gt;for all alpha &amp;gt; 0.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 20 Feb 2018 20:33:18 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-IML-Software-and-Matrix/Minimization-of-objective-function-with-matrix/m-p/438783#M4028</guid>
      <dc:creator>Rick_SAS</dc:creator>
      <dc:date>2018-02-20T20:33:18Z</dc:date>
    </item>
  </channel>
</rss>

