<?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: How to split data into training data and test data? in SAS Data Science</title>
    <link>https://communities.sas.com/t5/SAS-Data-Science/How-to-split-data-into-training-data-and-test-data/m-p/443673#M6787</link>
    <description>&lt;P&gt;Sorry, my request was misleading: please post the complete log including all steps that are executed.&lt;/P&gt;</description>
    <pubDate>Thu, 08 Mar 2018 08:04:44 GMT</pubDate>
    <dc:creator>andreas_lds</dc:creator>
    <dc:date>2018-03-08T08:04:44Z</dc:date>
    <item>
      <title>How to split data into training data and test data?</title>
      <link>https://communities.sas.com/t5/SAS-Data-Science/How-to-split-data-into-training-data-and-test-data/m-p/443662#M6784</link>
      <description>&lt;P&gt;Im using SAS 9.4&amp;nbsp;&lt;/P&gt;&lt;P&gt;So, I have a car data. I want to split data into training data and test data based on a variable "model year".&lt;/P&gt;&lt;P&gt;I want model year which is even to be training data and model year which is odd to be test data.&lt;/P&gt;&lt;P&gt;I tried the following code:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;proc import out=work.car5&lt;BR /&gt;datafile= "C:\desktop\Auto1.csv" dbms=csv;&lt;BR /&gt;getnames=yes; datarow=2;&lt;BR /&gt;run;&lt;/P&gt;&lt;P&gt;data train test;&amp;nbsp;&lt;BR /&gt;set year;&lt;BR /&gt;b=mod(year,2);&lt;BR /&gt;if b=0&lt;BR /&gt;then output train;&lt;BR /&gt;else output test;&lt;BR /&gt;run;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;but i got some error message. it did not work. How to solve this problem??&amp;nbsp; Thanks in advance!!&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 08 Mar 2018 07:32:48 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Data-Science/How-to-split-data-into-training-data-and-test-data/m-p/443662#M6784</guid>
      <dc:creator>ainlayray</dc:creator>
      <dc:date>2018-03-08T07:32:48Z</dc:date>
    </item>
    <item>
      <title>Re: How to split data into training data and test data?</title>
      <link>https://communities.sas.com/t5/SAS-Data-Science/How-to-split-data-into-training-data-and-test-data/m-p/443668#M6785</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/196565"&gt;@ainlayray&lt;/a&gt; wrote:&lt;BR /&gt;&lt;BR /&gt;...&lt;BR /&gt;
&lt;P&gt;&amp;nbsp;but i got some error message. it did not work. How to solve this problem??&amp;nbsp; Thanks in advance!!&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;This is normal logic: if you get an error message something did not work. So please post the log that we can see that message.&lt;/P&gt;</description>
      <pubDate>Thu, 08 Mar 2018 07:50:34 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Data-Science/How-to-split-data-into-training-data-and-test-data/m-p/443668#M6785</guid>
      <dc:creator>andreas_lds</dc:creator>
      <dc:date>2018-03-08T07:50:34Z</dc:date>
    </item>
    <item>
      <title>Re: How to split data into training data and test data?</title>
      <link>https://communities.sas.com/t5/SAS-Data-Science/How-to-split-data-into-training-data-and-test-data/m-p/443671#M6786</link>
      <description>&lt;P&gt;NOTE: The SAS System stopped processing this step because of errors.&lt;BR /&gt;WARNING: The data set WORK.TRAIN may be incomplete. When this step was stopped there were 0&lt;BR /&gt;observations and 2 variables.&lt;BR /&gt;WARNING: The data set WORK.TEST may be incomplete. When this step was stopped there were 0&lt;BR /&gt;observations and 2 variables.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;oh i see. im new here. This is the error message after the code. It created 2 new sets but 0 observations...&lt;/P&gt;</description>
      <pubDate>Thu, 08 Mar 2018 08:01:47 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Data-Science/How-to-split-data-into-training-data-and-test-data/m-p/443671#M6786</guid>
      <dc:creator>ainlayray</dc:creator>
      <dc:date>2018-03-08T08:01:47Z</dc:date>
    </item>
    <item>
      <title>Re: How to split data into training data and test data?</title>
      <link>https://communities.sas.com/t5/SAS-Data-Science/How-to-split-data-into-training-data-and-test-data/m-p/443673#M6787</link>
      <description>&lt;P&gt;Sorry, my request was misleading: please post the complete log including all steps that are executed.&lt;/P&gt;</description>
      <pubDate>Thu, 08 Mar 2018 08:04:44 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Data-Science/How-to-split-data-into-training-data-and-test-data/m-p/443673#M6787</guid>
      <dc:creator>andreas_lds</dc:creator>
      <dc:date>2018-03-08T08:04:44Z</dc:date>
    </item>
    <item>
      <title>Re: How to split data into training data and test data?</title>
      <link>https://communities.sas.com/t5/SAS-Data-Science/How-to-split-data-into-training-data-and-test-data/m-p/443868#M6792</link>
      <description>&lt;P&gt;thanks!&lt;/P&gt;&lt;P&gt;okay, I will post in that format in my next posts.&amp;nbsp; I will post the complete code and log.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;And I just solved my problem. In my command: "set year" , it refers to year data, not year variable.&lt;/P&gt;&lt;P&gt;so, I changed that to "set car5" which refers to my data. Then it worked... It is like many beginners' mistake...&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks anyways!!&lt;/P&gt;</description>
      <pubDate>Thu, 08 Mar 2018 19:13:18 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Data-Science/How-to-split-data-into-training-data-and-test-data/m-p/443868#M6792</guid>
      <dc:creator>ainlayray</dc:creator>
      <dc:date>2018-03-08T19:13:18Z</dc:date>
    </item>
  </channel>
</rss>

