<?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 calculating variable contribution within a neural net model in SAS Data Science</title>
    <link>https://communities.sas.com/t5/SAS-Data-Science/calculating-variable-contribution-within-a-neural-net-model/m-p/401110#M6103</link>
    <description>&lt;P&gt;have attempted to determine variable contributions by using the weights of each variable which&amp;nbsp;are located in the input layer. See attached output file from PROC HPNEURAL where the output file occurs from the OUTMODEL statement&amp;nbsp;.You will note that I use only the weights reported in the input layer because each input layer is connected to all the hidden layers. So the real differentiator&amp;nbsp;are the weights of the variables in the input layer.&amp;nbsp; You will see that the highlighted section(in green)&amp;nbsp;represents the information&amp;nbsp;which I &amp;nbsp;would use to calculate a given variable's contribution (i.e. sum up all the node weights(absolute) for that variable and then divide by the total weights of all nodes and all variables) but for the input layer only. Do not need to worry about the hidden layers as all the hidden layers and their weights map back to each node in the input layer. see attached file.&lt;/P&gt;</description>
    <pubDate>Wed, 04 Oct 2017 18:30:42 GMT</pubDate>
    <dc:creator>rboire</dc:creator>
    <dc:date>2017-10-04T18:30:42Z</dc:date>
    <item>
      <title>calculating variable contribution within a neural net model</title>
      <link>https://communities.sas.com/t5/SAS-Data-Science/calculating-variable-contribution-within-a-neural-net-model/m-p/401110#M6103</link>
      <description>&lt;P&gt;have attempted to determine variable contributions by using the weights of each variable which&amp;nbsp;are located in the input layer. See attached output file from PROC HPNEURAL where the output file occurs from the OUTMODEL statement&amp;nbsp;.You will note that I use only the weights reported in the input layer because each input layer is connected to all the hidden layers. So the real differentiator&amp;nbsp;are the weights of the variables in the input layer.&amp;nbsp; You will see that the highlighted section(in green)&amp;nbsp;represents the information&amp;nbsp;which I &amp;nbsp;would use to calculate a given variable's contribution (i.e. sum up all the node weights(absolute) for that variable and then divide by the total weights of all nodes and all variables) but for the input layer only. Do not need to worry about the hidden layers as all the hidden layers and their weights map back to each node in the input layer. see attached file.&lt;/P&gt;</description>
      <pubDate>Wed, 04 Oct 2017 18:30:42 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Data-Science/calculating-variable-contribution-within-a-neural-net-model/m-p/401110#M6103</guid>
      <dc:creator>rboire</dc:creator>
      <dc:date>2017-10-04T18:30:42Z</dc:date>
    </item>
    <item>
      <title>Re: calculating variable contribution within a neural net model</title>
      <link>https://communities.sas.com/t5/SAS-Data-Science/calculating-variable-contribution-within-a-neural-net-model/m-p/401922#M6111</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/142093"&gt;@rboire&lt;/a&gt;,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Can you clarify your question here? The community may be able to assist&amp;nbsp;if you provide&amp;nbsp;more details and a more defined question.&amp;nbsp;I see this other related thread between you and&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/10859"&gt;@DougWielenga&lt;/a&gt;: &lt;A href="https://communities.sas.com/t5/SAS-Data-Mining-and-Machine/SAS-Code-for-variable-importance-in-neural-net/m-p/397590" target="_blank"&gt;SAS Code for variable importance in neural net&lt;/A&gt;, so I'll include it here for reference.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks!&lt;/P&gt;
&lt;P&gt;Anna&amp;nbsp;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 06 Oct 2017 20:27:24 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Data-Science/calculating-variable-contribution-within-a-neural-net-model/m-p/401922#M6111</guid>
      <dc:creator>AnnaBrown</dc:creator>
      <dc:date>2017-10-06T20:27:24Z</dc:date>
    </item>
    <item>
      <title>Re: calculating variable contribution within a neural net model</title>
      <link>https://communities.sas.com/t5/SAS-Data-Science/calculating-variable-contribution-within-a-neural-net-model/m-p/402760#M6136</link>
      <description />
      <pubDate>Tue, 10 Oct 2017 14:10:57 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Data-Science/calculating-variable-contribution-within-a-neural-net-model/m-p/402760#M6136</guid>
      <dc:creator>rboire</dc:creator>
      <dc:date>2017-10-10T14:10:57Z</dc:date>
    </item>
    <item>
      <title>Re: calculating variable contribution within a neural net model</title>
      <link>https://communities.sas.com/t5/SAS-Data-Science/calculating-variable-contribution-within-a-neural-net-model/m-p/402765#M6137</link>
      <description>&lt;P&gt;Hi Anna,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I am not sure of the specific details you need. I have attached output and an explanation of the real issue which is trying to use the weights in the neural net as a way of capturing the variable importance. Again, though, thanks for your reply.&lt;/P&gt;</description>
      <pubDate>Tue, 10 Oct 2017 14:41:04 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Data-Science/calculating-variable-contribution-within-a-neural-net-model/m-p/402765#M6137</guid>
      <dc:creator>rboire</dc:creator>
      <dc:date>2017-10-10T14:41:04Z</dc:date>
    </item>
    <item>
      <title>Re: calculating variable contribution within a neural net model</title>
      <link>https://communities.sas.com/t5/SAS-Data-Science/calculating-variable-contribution-within-a-neural-net-model/m-p/402777#M6138</link>
      <description>&lt;P&gt;Thanks&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/142093"&gt;@rboire&lt;/a&gt;. I'll pass this along to some SAS experts here and see if they can assist or if more clarification is needed.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Anna&lt;/P&gt;</description>
      <pubDate>Tue, 10 Oct 2017 14:43:06 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Data-Science/calculating-variable-contribution-within-a-neural-net-model/m-p/402777#M6138</guid>
      <dc:creator>AnnaBrown</dc:creator>
      <dc:date>2017-10-10T14:43:06Z</dc:date>
    </item>
    <item>
      <title>Re: calculating variable contribution within a neural net model</title>
      <link>https://communities.sas.com/t5/SAS-Data-Science/calculating-variable-contribution-within-a-neural-net-model/m-p/402783#M6140</link>
      <description>&lt;P&gt;Using the weights in a neural network to determine variable importance is not straightforward (and some would argue can't/shouldn't be done), and if you are not careful you can easily end up with very misleading results. A weight from a node in the input layer (ie, representing that input) to a given node in the first hidden layer is not representative of the impact of that input on the final output node since it is only one small contribution to a very complex mathematical function combining all activation functions from other nodes in that layer, nested within the activation functions of subsequent layers.&amp;nbsp; The only real way to follow this through is with a very complicated application of the chain rule combining sensitivity information from the output node back to the input, through all layers and all nodes in those layers.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;My suggestion would be to build a surrogate decision tree model using scored output values from your NN model.&amp;nbsp; That is, score the training data set using the NN so that you now have a y_scored column and train a decision tree on all inputs vs y_scored.&amp;nbsp; The decision tree will give you a good assessment of variable importance.&lt;/P&gt;</description>
      <pubDate>Tue, 10 Oct 2017 14:53:46 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Data-Science/calculating-variable-contribution-within-a-neural-net-model/m-p/402783#M6140</guid>
      <dc:creator>BrettWujek</dc:creator>
      <dc:date>2017-10-10T14:53:46Z</dc:date>
    </item>
    <item>
      <title>Re: calculating variable contribution within a neural net model</title>
      <link>https://communities.sas.com/t5/SAS-Data-Science/calculating-variable-contribution-within-a-neural-net-model/m-p/402784#M6141</link>
      <description>&lt;P&gt;Do you have a reference about calculating variable importance/contribution based on the weights in this manner?&amp;nbsp; This is not something we generally advise, as you can have completely different sets of weights producing the same model and other issues with this approach are discussed here:&amp;nbsp;&lt;A href="ftp://ftp.sas.com/pub/neural/importance.html" target="_self"&gt;ftp://ftp.sas.com/pub/neural/importance.html&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 10 Oct 2017 15:00:51 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Data-Science/calculating-variable-contribution-within-a-neural-net-model/m-p/402784#M6141</guid>
      <dc:creator>WendyCzika</dc:creator>
      <dc:date>2017-10-10T15:00:51Z</dc:date>
    </item>
  </channel>
</rss>

