<?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: Using a Weight Statement to do Neural Networks - Weights non-integer and range from 0 to 1. in SAS Data Science</title>
    <link>https://communities.sas.com/t5/SAS-Data-Science/Using-a-Weight-Statement-to-do-Neural-Networks-Weights-non/m-p/424556#M6496</link>
    <description>&lt;P&gt;Consider using PROC HPNEURAL instead of PROC NEURAL.&amp;nbsp; PROC HPNEURAL has a WEIGHT statement.&amp;nbsp; Here is an excerpt:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;WEIGHT Statement&lt;BR /&gt;WEIGHT variable | _INVERSE_PRIORS_ ;&lt;BR /&gt;If you specify a WEIGHT statement, variable identifies a numeric variable in the input data set that contains&lt;BR /&gt;the weight to be placed on the prediction error (the difference between the output of the network and the&lt;BR /&gt;target value specified in the input data set) for each observation during training.&lt;BR /&gt;If, instead of specifying a variable, you specify the keyword _INVERSE_PRIORS_, the HPNEURAL&lt;BR /&gt;procedure calculates the weight applied to the prediction error of each nominal target variable as the total&lt;BR /&gt;number of observations divided by the number of observations whose target class is the same as the current&lt;BR /&gt;observation (in other words, the inverse of the fraction of the number of times that the target class occurs in&lt;BR /&gt;the input data set).&lt;BR /&gt;If variable is less than or equal to 0 or is missing, the observation is not used for training or for computing&lt;BR /&gt;validation error. When validation error is computed during training, the weights on the validation observations&lt;BR /&gt;are used even though weights are not used when scoring.&lt;BR /&gt;The WEIGHT statement is optional. If a WEIGHT statement is not included, all observations are assigned a&lt;BR /&gt;weight of 1.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;For full documentation, go to &lt;A href="http://support.sas.com/documentation/onlinedoc/miner/index.html" target="_self"&gt;http://support.sas.com/documentation/onlinedoc/miner/index.html&lt;/A&gt;, and select&amp;nbsp;&lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;&lt;A href="http://documentation.sas.com/?cdcId=pgmsascdc&amp;amp;cdcVersion=9.4_3.2&amp;amp;docsetId=emhpprcref&amp;amp;docsetTarget=titlepage.htm"&gt;SAS Enterprise Miner 14.3: High-Performance Procedures&lt;/A&gt;&lt;/LI&gt;
&lt;/UL&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Have a great new year.&lt;/P&gt;</description>
    <pubDate>Wed, 03 Jan 2018 13:02:42 GMT</pubDate>
    <dc:creator>MikeStockstill</dc:creator>
    <dc:date>2018-01-03T13:02:42Z</dc:date>
    <item>
      <title>Using a Weight Statement to do Neural Networks - Weights non-integer and range from 0 to 1.</title>
      <link>https://communities.sas.com/t5/SAS-Data-Science/Using-a-Weight-Statement-to-do-Neural-Networks-Weights-non/m-p/424500#M6493</link>
      <description>&lt;P&gt;Hi:&lt;/P&gt;&lt;P&gt;&amp;nbsp;I have weights that range in value from 0 to 1 (for example .05). I am able to run a weighted logistic regression using&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;proc logistic data = logistic outmodel=log_model;&lt;BR /&gt;&amp;nbsp; model&amp;nbsp; target_good_final (event='1') = &amp;amp;keep_it2&amp;nbsp; / selection = forward sle=.01;&lt;BR /&gt;&amp;nbsp; output out = stats p = prob_good_log xbeta = logit_good ;&lt;BR /&gt;&amp;nbsp; weight weight;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;But I am not sure how to do the same thing for a neural net work. There doesn't appear to be a weight statement&amp;nbsp;for Proc Neural,&lt;/P&gt;&lt;P&gt;Proc DMNEURL suggest that you use include the weight variable in your data set as a "Freq" variable. Then use Proc DMDB to create a catalog for its use. But if you make weight a FREQ variable then it becomes an integer which I don't want&amp;nbsp;. PROC IMSTAT has a Neural statement and a weight that does not require a PROC DMDB as required by Proc Neural and Proc DMNEURL (See below).&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;proc dmdb data=training&amp;amp;j dmdbcat=cat;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;class &amp;amp;target;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;var &amp;amp;inputs;&amp;nbsp;&amp;nbsp;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;target &amp;amp;target;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Any suggestions as the best way to go ?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Thanks&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Michael Quigley&lt;/P&gt;</description>
      <pubDate>Wed, 03 Jan 2018 03:37:32 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Data-Science/Using-a-Weight-Statement-to-do-Neural-Networks-Weights-non/m-p/424500#M6493</guid>
      <dc:creator>quigleym</dc:creator>
      <dc:date>2018-01-03T03:37:32Z</dc:date>
    </item>
    <item>
      <title>Re: Using a Weight Statement to do Neural Networks - Weights non-integer and range from 0 to 1.</title>
      <link>https://communities.sas.com/t5/SAS-Data-Science/Using-a-Weight-Statement-to-do-Neural-Networks-Weights-non/m-p/424556#M6496</link>
      <description>&lt;P&gt;Consider using PROC HPNEURAL instead of PROC NEURAL.&amp;nbsp; PROC HPNEURAL has a WEIGHT statement.&amp;nbsp; Here is an excerpt:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;WEIGHT Statement&lt;BR /&gt;WEIGHT variable | _INVERSE_PRIORS_ ;&lt;BR /&gt;If you specify a WEIGHT statement, variable identifies a numeric variable in the input data set that contains&lt;BR /&gt;the weight to be placed on the prediction error (the difference between the output of the network and the&lt;BR /&gt;target value specified in the input data set) for each observation during training.&lt;BR /&gt;If, instead of specifying a variable, you specify the keyword _INVERSE_PRIORS_, the HPNEURAL&lt;BR /&gt;procedure calculates the weight applied to the prediction error of each nominal target variable as the total&lt;BR /&gt;number of observations divided by the number of observations whose target class is the same as the current&lt;BR /&gt;observation (in other words, the inverse of the fraction of the number of times that the target class occurs in&lt;BR /&gt;the input data set).&lt;BR /&gt;If variable is less than or equal to 0 or is missing, the observation is not used for training or for computing&lt;BR /&gt;validation error. When validation error is computed during training, the weights on the validation observations&lt;BR /&gt;are used even though weights are not used when scoring.&lt;BR /&gt;The WEIGHT statement is optional. If a WEIGHT statement is not included, all observations are assigned a&lt;BR /&gt;weight of 1.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;For full documentation, go to &lt;A href="http://support.sas.com/documentation/onlinedoc/miner/index.html" target="_self"&gt;http://support.sas.com/documentation/onlinedoc/miner/index.html&lt;/A&gt;, and select&amp;nbsp;&lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;&lt;A href="http://documentation.sas.com/?cdcId=pgmsascdc&amp;amp;cdcVersion=9.4_3.2&amp;amp;docsetId=emhpprcref&amp;amp;docsetTarget=titlepage.htm"&gt;SAS Enterprise Miner 14.3: High-Performance Procedures&lt;/A&gt;&lt;/LI&gt;
&lt;/UL&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Have a great new year.&lt;/P&gt;</description>
      <pubDate>Wed, 03 Jan 2018 13:02:42 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Data-Science/Using-a-Weight-Statement-to-do-Neural-Networks-Weights-non/m-p/424556#M6496</guid>
      <dc:creator>MikeStockstill</dc:creator>
      <dc:date>2018-01-03T13:02:42Z</dc:date>
    </item>
    <item>
      <title>Re: Using a Weight Statement to do Neural Networks - Weights non-integer and range from 0 to 1.</title>
      <link>https://communities.sas.com/t5/SAS-Data-Science/Using-a-Weight-Statement-to-do-Neural-Networks-Weights-non/m-p/425774#M6519</link>
      <description>&lt;P&gt;Great Idea this worked. I tried a number of different results some examples are shown below:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;First: One layer 2 neurons: &lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;proc hpneural data=tempq;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; input &amp;amp;keep_it;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; id perf_seq_num &amp;amp;target &amp;amp;validate &amp;amp;weight ;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; target &amp;amp;target / level=nom;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;nbsp;&amp;nbsp; hidden 2;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; partition rolevar=&amp;amp;validate(train=0);&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; train outmodel=model_l1_n2 numtries=5 maxiter=1000;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; scores out=scores_l1_n2;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; code file = "&amp;amp;codefile";&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; weight &amp;amp;weight;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Second: 2 Layers 3 Neurons&lt;/STRONG&gt;:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;proc hpneural data=tempq;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; input &amp;amp;keep_it;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; id perf_seq_num &amp;amp;target &amp;amp;validate &amp;amp;weight ;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; target &amp;amp;target / level=nom;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;nbsp;&amp;nbsp; hidden 3;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;nbsp;&amp;nbsp; hidden 3; &lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; partition rolevar=&amp;amp;validate(train=0);&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; train outmodel=model_&amp;amp;model numtries=5 maxiter=1000;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; score out=scores_&amp;amp;model;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; code file = "&amp;amp;codefile";&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; weight &amp;amp;weight;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Third: 5 layers 3 Neurons: &lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;proc hpneural data=tempq;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; input &amp;amp;keep_it;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; id perf_seq_num &amp;amp;target &amp;amp;validate &amp;amp;weight ;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; target &amp;amp;target / level=nom;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;nbsp;&amp;nbsp; hidden 3;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;nbsp;&amp;nbsp; hidden 3;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;nbsp;&amp;nbsp; hidden 3;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;nbsp;&amp;nbsp; hidden 3;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;nbsp;&amp;nbsp; hidden 3; &lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; partition rolevar=&amp;amp;validate(train=0);&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; train outmodel=model_&amp;amp;model numtries=5 maxiter=1000;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; score out=scores_&amp;amp;model;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; code file = "&amp;amp;codefile";&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; weight &amp;amp;weight;&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;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Fourth: 2 Layers First layer 100 neurons Second layer 50 neurons: &lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;nbsp;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;proc hpneural data=tempq;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;nbsp;&amp;nbsp; input &amp;amp;keep_it;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;nbsp;&amp;nbsp; id perf_seq_num &amp;amp;target &amp;amp;validate &amp;amp;weight ;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;nbsp;&amp;nbsp; target &amp;amp;target / level=nom;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;nbsp;&amp;nbsp; hidden 100;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;nbsp;&amp;nbsp; hidden 50;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;nbsp; partition rolevar=&amp;amp;validate(train=0);&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;nbsp;&amp;nbsp; train outmodel=model_&amp;amp;model numtries=5 maxiter=1000;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;nbsp;&amp;nbsp; score out=scores_&amp;amp;model;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;nbsp;&amp;nbsp; code file = "&amp;amp;codefile";&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;nbsp;&amp;nbsp; weight &amp;amp;weight;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;nbsp;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;run;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 08 Jan 2018 15:03:13 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Data-Science/Using-a-Weight-Statement-to-do-Neural-Networks-Weights-non/m-p/425774#M6519</guid>
      <dc:creator>quigleym</dc:creator>
      <dc:date>2018-01-08T15:03:13Z</dc:date>
    </item>
  </channel>
</rss>

