<?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: Partition Data (Validation, Train, Test) for Logistic Regression in Discussions</title>
    <link>https://community.jmp.com/t5/Discussions/Partition-Data-Validation-Train-Test-for-Logistic-Regression/m-p/58740#M32442</link>
    <description>&lt;P&gt;The path of least resistance is to use JMP Pro and the Make Validation Column utility. Think about perhaps using the stratify random option for partitioning the response variable set. Then when you actually launch the platform, make sure to place the column name in the Validation window on the Fit Model platform launch window.&lt;/P&gt;</description>
    <pubDate>Thu, 31 May 2018 03:24:10 GMT</pubDate>
    <dc:creator>Peter_Bartell</dc:creator>
    <dc:date>2018-05-31T03:24:10Z</dc:date>
    <item>
      <title>Partition Data (Validation, Train, Test) for Logistic Regression</title>
      <link>https://community.jmp.com/t5/Discussions/Partition-Data-Validation-Train-Test-for-Logistic-Regression/m-p/58695#M32418</link>
      <description>&lt;P&gt;How do you partition data and then model on a portion of it (Validation for example) for nominal logistic regression?&lt;/P&gt;</description>
      <pubDate>Wed, 30 May 2018 15:14:14 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Partition-Data-Validation-Train-Test-for-Logistic-Regression/m-p/58695#M32418</guid>
      <dc:creator>Kathleen</dc:creator>
      <dc:date>2018-05-30T15:14:14Z</dc:date>
    </item>
    <item>
      <title>Re: Partition Data (Validation, Train, Test) for Logistic Regression</title>
      <link>https://community.jmp.com/t5/Discussions/Partition-Data-Validation-Train-Test-for-Logistic-Regression/m-p/58740#M32442</link>
      <description>&lt;P&gt;The path of least resistance is to use JMP Pro and the Make Validation Column utility. Think about perhaps using the stratify random option for partitioning the response variable set. Then when you actually launch the platform, make sure to place the column name in the Validation window on the Fit Model platform launch window.&lt;/P&gt;</description>
      <pubDate>Thu, 31 May 2018 03:24:10 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Partition-Data-Validation-Train-Test-for-Logistic-Regression/m-p/58740#M32442</guid>
      <dc:creator>Peter_Bartell</dc:creator>
      <dc:date>2018-05-31T03:24:10Z</dc:date>
    </item>
    <item>
      <title>Re: Partition Data (Validation, Train, Test) for Logistic Regression</title>
      <link>https://community.jmp.com/t5/Discussions/Partition-Data-Validation-Train-Test-for-Logistic-Regression/m-p/58741#M32443</link>
      <description>&lt;P&gt;JMP Pro definitely makes this effortless, but here's a way to mimic the functionality in JMP Pro of creating the partition.&amp;nbsp; Using the partitons will still be pretty manual.&amp;nbsp; You could just hide/exclude the val and test sets to fit the model to the training data, then predict with the training model on the val and test sets using a saved prediction formula from whichever platform you are using.&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;dt = Current Data Table();
n_rows = N Row(dt);

//determine proportions for training and validation sets (test is whatever is left over)
train_prop = 0.7;
val_prop = 0.15;

test_prop = 1-train_prop-val_prop;

//randomly shuffle row numbers
rows_shuffled = random shuffle(1::n_rows);

//determine precise number of data points for each partition
n_train = floor(train_prop*n_rows);
n_val = ceiling(val_prop*n_rows);
n_test = n_rows - n_train - n_val;

//obtain the desired data points for the partitions
train_rows = rows_shuffled[1::n_train];
val_rows = rows_shuffled[(n_train+1)::(n_train+1+n_val)];
test_rows = rows_shuffled[(n_rows-n_test)::n_rows];

//Create the partition column
partition_col = dt &amp;lt;&amp;lt; New Column("Partition", numeric, nominal); //use partition_col just in case a Partition column already exists and the new column gets a name like "Partition 2"
//mimic JMP Prop underlying numeric values
partition_col[train_rows] = 1;
partition_col[val_rows] = 2;
partition_col[test_rows] = 3;

//Add value labels
partition_col &amp;lt;&amp;lt; Add Column Properties({Value Labels( {"." = "Other", 1 = "Training", 2 = "Validation", 3 = "Test"} ),
Use Value Labels( 1 )});&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;I just whipped this together, but you could easily make this into an app with a dialog asking for the proportions for the training and validation.&amp;nbsp; You could make it really handy by adding the script for that app to a menu or toolbar via View &amp;gt; Customize &amp;gt; Menus and Toolbars.&lt;/P&gt;</description>
      <pubDate>Thu, 31 May 2018 04:07:23 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Partition-Data-Validation-Train-Test-for-Logistic-Regression/m-p/58741#M32443</guid>
      <dc:creator>cwillden</dc:creator>
      <dc:date>2018-05-31T04:07:23Z</dc:date>
    </item>
  </channel>
</rss>

