Make Validation Column
Example 1
Summary: Creates a validation column in JMP, specifying training and validation set sizes, test set size, and validation column type.
Code:
dt = Open("data_table.jmp");
mvc = dt << Make Validation Column( Training Set( 0.75 ), Validation Set( 0.25 ), Test Set( 0 ), Validation Column Type( "Formula" ), Go );
oracle_validation = [0, 0, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 1, 0, 1, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 1, 1
];
Code Explanation:
- Open data table;
- Create validation column.
- Define training set size.
- Define validation set size.
- Set test set size.
- Specify validation column type.
- Execute validation creation.
- Define oracle validation array.
Example 2
Summary: Creates a validation column in JMP, grouping data by gender and setting training, validation, and test sets to specific proportions.
Code:
dt = Open("data_table.jmp");
mvc = dt << Make Validation Column(
Grouping Columns( :Gender ),
Training Set( 0.75 ),
Validation Set( 0.15 ),
Test Set( 0.10 ),
Random Seed( 65498712 ),
Go
);
oracle_validation = [0, 0, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 1, 0, 1, 0, 0, 1, 0, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 1, 0, 1, 0, 0,
0, 0, 1, 1, 1, 1, 1, 1, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0, 0, 1, 0, 1, 0, 0, 0, 0, 0, 0, 1, 0, 1, 1, 1, 0, 0, 1, 0, 0, 0, 1,
0, 0, 0, 0, 0, 0, 0, 1, 0, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 0, 1, 1, 1, 1, 0, 0, 0, 0, 0,
0, 0, 1, 0, 1, 1, 0, 1, 1, 0, 0, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 1, 1, 0, 1, 1, 0, 0, 0, 0, 0, 1, 0, 1, 0, 0, 0, 1,
1, 1, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 0, 1, 1, 1, 0, 0, 1, 1, 1, 0,
0, 0, 0, 0, 1, 0, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 1, 0, 1, 0, 1, 0, 0, 1, 1, 0, 0, 0, 0, 1, 1,
0, 0, 1, 0, 0, 0, 1, 1, 1, 0, 1, 1, 1, 0, 1, 0, 1, 1, 0, 0, 1, 1, 1, 0, 1, 0, 1, 0, 0, 0, 1, 0, 1, 0, 0, 1, 1, 1, 0, 1, 1, 0, 0, 1, 1, 1, 1,
0, 1, 1, 1, 1, 1, 1, 0, 0, 1, 1, 0, 0, 1, 1, 0, 0, 1, 1, 1, 1, 0, 0, 0, 0, 0, 1, 1, 1, 1, 0, 0, 1, 0, 1, 1, 1, 1, 0, 1, 0, 0, 0, 1, 0, 0, 1,
0, 0, 1, 0, 0, 0, 1, 0, 0, 1, 0, 1, 1, 0, 1, 1, 1, 0, 0, 0, 1, 0, 1, 1, 1, 1, 0, 0, 1, 0, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 0,
0, 1, 1, 1, 0, 0, 1, 0, 1, 1, 1, 1, 0, 1, 1, 0, 1, 1, 1, 0, 1, 1, 1, 1, 0, 0, 0, 0, 1, 0, 1, 0];
Close( dt, nosave );
Random Reset( 5648941253 );
Code Explanation:
- Open table.
- Create validation column.
- Group by gender.
- Set training set to 75%.
- Set validation set to 15%.
- Set test set to 10%.
- Use random seed 65498712.
- Execute validation creation.
- Close table without saving.
- Reset random seed.
Example 3
Summary: Creates a validation column in JMP, stratifying by height and grouping by age, with specified training, validation, and test set sizes.
Code:
dt = Open("data_table.jmp");
mvc = dt << Make Validation Column(
Stratification Columns( :height ),
Grouping Columns( :age ),
Training Set( 0.75 ),
Validation Set( 0.15 ),
Test Set( 0.10 ),
Random Seed( 65498712 ),
Go
);
oracle_validation = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 2, 2, 2, 0, 0, 0
];
Close( dt, nosave );
Random Reset( 5648941253 );
Code Explanation:
- Open data table;
- Create validation column.
- Stratify by height.
- Group by age.
- Set training size to 75%.
- Set validation size to 15%.
- Set test size to 10%.
- Use random seed 65498712.
- Close file without saving.
- Reset random seed to 5648941253.
Example 4
Summary: Creates a validation column in JMP, grouping data by gender and allocating 75% for training, 15% for validation, and 10% for testing.
Code:
dt = Open("data_table.jmp");
mvc = dt << Make Validation Column(
Grouping Columns( :Gender ),
Training Set( 0.75 ),
Validation Set( 0.15 ),
Test Set( 0.10 ),
Random Seed( 65498712 ),
Go
);
oracle_validation = [0, 0, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 1, 0, 1, 0, 0, 1, 0, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 1, 0, 1, 0, 0,
0, 0, 1, 1, 1, 1, 1, 1, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0, 0, 1, 0, 1, 0, 0, 0, 0, 0, 0, 1, 0, 1, 1, 1, 0, 0, 1, 0, 0, 0, 1,
0, 0, 0, 0, 0, 0, 0, 1, 0, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 0, 1, 1, 1, 1, 0, 0, 0, 0, 0,
0, 0, 1, 0, 1, 1, 0, 1, 1, 0, 0, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 1, 1, 0, 1, 1, 0, 0, 0, 0, 0, 1, 0, 1, 0, 0, 0, 1,
1, 1, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 0, 1, 1, 1, 0, 0, 1, 1, 1, 0,
0, 0, 0, 0, 1, 0, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 1, 0, 1, 0, 1, 0, 0, 1, 1, 0, 0, 0, 0, 1, 1,
0, 0, 1, 0, 0, 0, 1, 1, 1, 0, 1, 1, 1, 0, 1, 0, 1, 1, 0, 0, 1, 1, 1, 0, 1, 0, 1, 0, 0, 0, 1, 0, 1, 0, 0, 1, 1, 1, 0, 1, 1, 0, 0, 1, 1, 1, 1,
0, 1, 1, 1, 1, 1, 1, 0, 0, 1, 1, 0, 0, 1, 1, 0, 0, 1, 1, 1, 1, 0, 0, 0, 0, 0, 1, 1, 1, 1, 0, 0, 1, 0, 1, 1, 1, 1, 0, 1, 0, 0, 0, 1, 0, 0, 1,
0, 0, 1, 0, 0, 0, 1, 0, 0, 1, 0, 1, 1, 0, 1, 1, 1, 0, 0, 0, 1, 0, 1, 1, 1, 1, 0, 0, 1, 0, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 0,
0, 1, 1, 1, 0, 0, 1, 0, 1, 1, 1, 1, 0, 1, 1, 0, 1, 1, 1, 0, 1, 1, 1, 1, 0, 0, 0, 0, 1, 0, 1, 0];
Code Explanation:
- Open data table.
- Create validation column.
- Group by gender.
- Allocate 75% training set.
- Allocate 15% validation set.
- Allocate 10% test set.
- Set random seed.
- Execute validation creation.
- Define oracle validation array.
- End script.
Example 5
Summary: Creates a validation column in JMP, stratified by height and grouped by age, with 75% training data, 15% validation data, and 10% test data.
Code:
dt = Open("data_table.jmp");
mvc = dt << Make Validation Column(
Stratification Columns( :height ),
Grouping Columns( :age ),
Training Set( 0.75 ),
Validation Set( 0.15 ),
Test Set( 0.10 ),
Random Seed( 65498712 ),
Go
);
oracle_validation = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 2, 2, 2, 0, 0, 0
];
Code Explanation:
- Open data table;
- Create validation column.
- Stratify by height.
- Group by age.
- Allocate 75% training data.
- Allocate 15% validation data.
- Allocate 10% test data.
- Set random seed 65498712.
- Execute validation creation.
- Define oracle validation array.
Example 6
Summary: Creates two validation columns in a JMP data table, utilizing cutpoints and batch IDs to allocate training, validation, and testing sets.
Code:
dt = Open("data_table.jmp");
dt << Make Validation Column(
Cutpoint Column( :weight ),
Cutpoint Batch ID( :sex ),
Training Set( 0.6 ),
Validation Set( 0.2 ),
Test Set( 0.2 ),
Go
);
dt << New Column( "Batch 2", Numeric, "Nominal", Formula( If( :sex == "F", 1, 2 ) ) );
dt << Make Validation Column(
Cutpoint Column( :weight ),
Cutpoint Batch ID( :Batch 2 ),
Training Set( 0.6 ),
Validation Set( 0.2 ),
Test Set( 0.2 ),
Go
);
oracleVal = dt[0, "Validation 2"];
Close( dt, nosave );
Preferences( Enable Advanced Linear Algebra Routines( 0 ) );
Code Explanation:
- Open data table.
- Create first validation column.
- Use weight for cutpoints.
- Use sex for batch ID.
- Allocate 60% for training.
- Allocate 20% for validation.
- Allocate 20% for testing.
- Create new column "Batch 2".
- Define formula for "Batch 2".
- Create second validation column.
- Use weight for cutpoints.
- Use "Batch 2" for batch ID.
- Allocate 60% for training.
- Allocate 20% for validation.
- Allocate 20% for testing.
- Retrieve validation set.
- Close data table without saving.
- Disable advanced linear algebra routines.
Example 7
Summary: Creates a validation column for stratification by weight, utilizing the Make Validation Column and Column Switcher features in JMP.
Code:
dt = Open("data_table.jmp");
obj = dt << Make Validation Column( Stratification Columns( :weight ) );
ColumnSwitcherObject = obj << Column Switcher( :weight, {:height, :weight} );
obj = Window( "data_table - Make Validation Column by weight" );
Code Explanation:
- Open table.
- Create validation column.
- Set stratification columns.
- Initialize column switcher object.
- Switch columns for analysis.
- Access window title.
Example 8
Summary: Creates multiple validation columns in a JMP data table, allowing for various training and testing scenarios to be explored.
Code:
dt = Open("data_table.jmp");
dt << Make Validation Column(
Cutpoint Column( :height ),
Training Set( 0.75 ),
Validation Set( 0 ),
Test Set( 0.25 ),
New Column Name( "Validation - Only Training+Test" ),
Go
);
dt << Make Validation Column(
Cutpoint Column( :height ),
Training Set( 0.75 ),
Validation Set( 0.25 ),
Test Set( 0 ),
New Column Name( "Validation - Only Training+Validation" ),
Go
);
dt << Make Validation Column(
Cutpoint Column( :height ),
Training Set( 0 ),
Validation Set( 0.75 ),
Test Set( 0.25 ),
New Column Name( "Validation - Only Validation+Test" ),
Go
);
dt << Make Validation Column(
Cutpoint Column( :height ),
Training Set( 1 ),
Validation Set( 0 ),
Test Set( 0 ),
New Column Name( "Validation - Only Training" ),
Go
);
dt << Make Validation Column(
Cutpoint Column( :height ),
Training Set( 0 ),
Validation Set( 1 ),
Test Set( 0 ),
New Column Name( "Validation - Only Validation" ),
Go
);
dt << Make Validation Column(
Cutpoint Column( :height ),
Training Set( 0 ),
Validation Set( 0 ),
Test Set( 1 ),
New Column Name( "Validation - Only Test" ),
Go
);
dt << Make Validation Column(
Cutpoint Column( :height ),
Training Set( 0.2 ),
Validation Set( 0.3 ),
Test Set( 0.5 ),
New Column Name( "Validation - All" ),
Go
);
Code Explanation:
- Open data table;
- Create validation column.
- Set height as cutpoint.
- Allocate 75% for training.
- Allocate 0% for validation.
- Allocate 25% for testing.
- Name column "Validation - Only Training+Test".
- Create another validation column.
- Allocate 75% for training.
- Allocate 25% for validation.
- Allocate 0% for testing.
- Name column "Validation - Only Training+Validation".
- Create another validation column.
- Allocate 0% for training.
- Allocate 75% for validation.
- Allocate 25% for testing.
- Name column "Validation - Only Validation+Test".
- Create another validation column.
- Allocate 100% for training.
- Allocate 0% for validation.
- Allocate 0% for testing.
- Name column "Validation - Only Training".
- Create another validation column.
- Allocate 0% for training.
- Allocate 100% for validation.
- Allocate 0% for testing.
- Name column "Validation - Only Validation".
- Create another validation column.
- Allocate 0% for training.
- Allocate 0% for validation.
- Allocate 100% for testing.
- Name column "Validation - Only Test".
- Create another validation column.
- Allocate 20% for training.
- Allocate 30% for validation.
- Allocate 50% for testing.
- Name column "Validation - All".
Example 9
Summary: Creates validation columns with varying training, validation, and test set allocations for a data table.
Code:
dt = Open("data_table.jmp");
dt << Make Validation Column(
Cutpoint Column( :height ),
Cutpoint Batch ID( :age ),
Training Set( 0.75 ),
Validation Set( 0 ),
Test Set( 0.25 ),
New Column Name( "Validation - Only Training+Test" ),
Go
);
dt << Make Validation Column(
Cutpoint Column( :height ),
Cutpoint Batch ID( :age ),
Training Set( 0.75 ),
Validation Set( 0.25 ),
Test Set( 0 ),
New Column Name( "Validation - Only Training+Validation" ),
Go
);
dt << Make Validation Column(
Cutpoint Column( :height ),
Cutpoint Batch ID( :age ),
Training Set( 0 ),
Validation Set( 0.75 ),
Test Set( 0.25 ),
New Column Name( "Validation - Only Validation+Test" ),
Go
);
dt << Make Validation Column(
Cutpoint Column( :height ),
Cutpoint Batch ID( :age ),
Training Set( 1 ),
Validation Set( 0 ),
Test Set( 0 ),
New Column Name( "Validation - Only Training" ),
Go
);
dt << Make Validation Column(
Cutpoint Column( :height ),
Cutpoint Batch ID( :age ),
Training Set( 0 ),
Validation Set( 1 ),
Test Set( 0 ),
New Column Name( "Validation - Only Validation" ),
Go
);
dt << Make Validation Column(
Cutpoint Column( :height ),
Cutpoint Batch ID( :age ),
Training Set( 0 ),
Validation Set( 0 ),
Test Set( 1 ),
New Column Name( "Validation - Only Test" ),
Go
);
dt << Make Validation Column(
Cutpoint Column( :height ),
Cutpoint Batch ID( :age ),
Training Set( 0.2 ),
Validation Set( 0.3 ),
Test Set( 0.5 ),
New Column Name( "Validation - All" ),
Go
);
Code Explanation:
- Open data table;
- Create validation column with height cutpoint.
- Use age for batch ID.
- Allocate 75% for training.
- Allocate 0% for validation.
- Allocate 25% for testing.
- Name new column "Validation - Only Training+Test".
- Repeat steps 2-7 for different allocations.
- Allocate 75% for training.
- Allocate 25% for validation.
- Allocate 0% for testing.
- Name new column "Validation - Only Training+Validation".
- Allocate 0% for training.
- Allocate 75% for validation.
- Allocate 25% for testing.
- Name new column "Validation - Only Validation+Test".
- Allocate 100% for training.
- Allocate 0% for validation.
- Allocate 0% for testing.
- Name new column "Validation - Only Training".
- Allocate 0% for training.
- Allocate 100% for validation.
- Allocate 0% for testing.
- Name new column "Validation - Only Validation".
- Allocate 0% for training.
- Allocate 0% for validation.
- Allocate 100% for testing.
- Name new column "Validation - Only Test".
- Allocate 20% for training.
- Allocate 30% for validation.
- Allocate 50% for testing.
- Name new column "Validation - All".
Example 10
Summary: Creates multiple validation columns in a JMP data table, allowing for various training and test set combinations to be evaluated.
Code:
dt = Open("data_table.jmp");
dt << Make Validation Column(
Cutpoint Column( :height ),
Training Set( 0.75 ),
Validation Set( 0 ),
Test Set( 0.25 ),
New Column Name( "Validation - Only Training+Test" ),
Validation Column Type( "Formula" ),
Go
);
dt << Make Validation Column(
Cutpoint Column( :height ),
Training Set( 0.75 ),
Validation Set( 0.25 ),
Test Set( 0 ),
New Column Name( "Validation - Only Training+Validation" ),
Validation Column Type( "Formula" ),
Go
);
dt << Make Validation Column(
Cutpoint Column( :height ),
Training Set( 0 ),
Validation Set( 0.75 ),
Test Set( 0.25 ),
New Column Name( "Validation - Only Validation+Test" ),
Validation Column Type( "Formula" ),
Go
);
dt << Make Validation Column(
Cutpoint Column( :height ),
Training Set( 1 ),
Validation Set( 0 ),
Test Set( 0 ),
New Column Name( "Validation - Only Training" ),
Validation Column Type( "Formula" ),
Go
);
dt << Make Validation Column(
Cutpoint Column( :height ),
Training Set( 0 ),
Validation Set( 1 ),
Test Set( 0 ),
New Column Name( "Validation - Only Validation" ),
Validation Column Type( "Formula" ),
Go
);
dt << Make Validation Column(
Cutpoint Column( :height ),
Training Set( 0 ),
Validation Set( 0 ),
Test Set( 1 ),
New Column Name( "Validation - Only Test" ),
Validation Column Type( "Formula" ),
Go
);
dt << Make Validation Column(
Cutpoint Column( :height ),
Training Set( 0.2 ),
Validation Set( 0.3 ),
Test Set( 0.5 ),
New Column Name( "Validation - All" ),
Validation Column Type( "Formula" ),
Go
);
Code Explanation:
- Open data table;
- Create validation column.
- Set training set to 75%.
- Set test set to 25%.
- Name column "Validation - Only Training+Test".
- Create another validation column.
- Set training set to 75%.
- Set validation set to 25%.
- Name column "Validation - Only Training+Validation".
- Create additional validation columns for different splits and names.
Example 11
Summary: Creates multiple validation columns in a JMP data table, utilizing cutpoints and batch IDs to define training, validation, and test sets.
Code:
dt = Open("data_table.jmp");
dt << Make Validation Column(
Cutpoint Column( :height ),
Cutpoint Batch ID( :age ),
Training Set( 0.75 ),
Validation Set( 0 ),
Test Set( 0.25 ),
New Column Name( "Validation - Only Training+Test" ),
Validation Column Type( "Formula" ),
Go
);
dt << Make Validation Column(
Cutpoint Column( :height ),
Cutpoint Batch ID( :age ),
Training Set( 0.75 ),
Validation Set( 0.25 ),
Test Set( 0 ),
New Column Name( "Validation - Only Training+Validation" ),
Validation Column Type( "Formula" ),
Go
);
dt << Make Validation Column(
Cutpoint Column( :height ),
Cutpoint Batch ID( :age ),
Training Set( 0 ),
Validation Set( 0.75 ),
Test Set( 0.25 ),
New Column Name( "Validation - Only Validation+Test" ),
Validation Column Type( "Formula" ),
Go
);
dt << Make Validation Column(
Cutpoint Column( :height ),
Cutpoint Batch ID( :age ),
Training Set( 1 ),
Validation Set( 0 ),
Test Set( 0 ),
New Column Name( "Validation - Only Training" ),
Validation Column Type( "Formula" ),
Go
);
dt << Make Validation Column(
Cutpoint Column( :height ),
Cutpoint Batch ID( :age ),
Training Set( 0 ),
Validation Set( 1 ),
Test Set( 0 ),
New Column Name( "Validation - Only Validation" ),
Validation Column Type( "Formula" ),
Go
);
dt << Make Validation Column(
Cutpoint Column( :height ),
Cutpoint Batch ID( :age ),
Training Set( 0 ),
Validation Set( 0 ),
Test Set( 1 ),
New Column Name( "Validation - Only Test" ),
Validation Column Type( "Formula" ),
Go
);
dt << Make Validation Column(
Cutpoint Column( :height ),
Cutpoint Batch ID( :age ),
Training Set( 0.2 ),
Validation Set( 0.3 ),
Test Set( 0.5 ),
New Column Name( "Validation - All" ),
Validation Column Type( "Formula" ),
Go
);
Code Explanation:
- Open data table;
- Create validation column.
- Use height for cutpoints.
- Use age for batch ID.
- Set training set to 75%.
- Set test set to 25%.
- Name column "Validation - Only Training+Test".
- Repeat steps 2-7 for other validation scenarios.
- Create all specified validation columns.
- Save changes.
Example 12
Summary: Creates validation columns in a JMP data table, utilizing various cutpoints and training sets to determine optimal values.
Code:
dt = Open("data_table.jmp");
dt[1 :: 40, "weight"] = .;
dt << Make Validation Column( Cutpoint Column( :weight ), Go );
dt << Make Validation Column( Cutpoint Column( :weight ), Cutpoint Batch ID( :age ), New Column Name( "Validation by Batch" ), Go );
dt << Make Validation Column(
Cutpoint Column( :weight ),
Training Set( 18 ),
Validation Set( 7 ),
Test Set( 4 ),
New Column Name( "Number of Rows" ),
Determine cutpoints using( "Numbers of Rows" ),
Go
);
dt << Make Validation Column(
Cutpoint Column( :weight ),
Training Set( 64 ),
Validation Set( 119 ),
Test Set( 142.65 ),
Determine cutpoints using( "Fixed Time or Date" ),
New Column Name( "Fixed Time or Date" ),
Go
);
dt << Make Validation Column(
Cutpoint Column( :weight ),
Training Set( 41.09 ),
Validation Set( 39.91 ),
Test Set( 27 ),
Determine cutpoints using( "Elapsed Time" ),
New Column Name( "Elapsed Time" ),
Go
);
Code Explanation:
- Open data table;
- Set first 40 rows' weight to missing.
- Create validation column using weight.
- Create "Validation by Batch" column.
- Create "Number of Rows" validation column.
- Create "Fixed Time or Date" validation column.
- Create "Elapsed Time" validation column.
Example 13
Summary: Creates a validation column in a JMP data table, defining cutpoints for time and batch ID, and assigning extra rows to validation.
Code:
dt = Open("data_table.jmp");
obj = Make Validation Column(
Cutpoint Column( :Time ),
Cutpoint Batch ID( :Series ),
Training Set( 26 ),
Validation Set( 3 ),
Test Set( 7 ),
Validation Column Type( "Formula" ),
Determine cutpoints using( "Numbers of Rows" ),
Assign Extra Rows( "To Validation" ),
Go
);
dtSummary = dt << Summary( Group( :Series, :Validation ), Freq( "None" ), Weight( "None" ) );
Code Explanation:
- Open data table.
- Create validation column.
- Define cutpoint column.
- Define cutpoint batch ID.
- Set training size.
- Set validation size.
- Set test size.
- Use formula for validation.
- Determine cutpoints by rows.
- Assign extra rows to validation.
Example 14
Summary: Creates a validation column in a JMP data table, defining cutpoints for time and batch ID, and specifying training, validation, and test set sizes.
Code:
dt = Open("data_table.jmp");
obj = Make Validation Column(
Cutpoint Column( :Time ),
Cutpoint Batch ID( :Series ),
Training Set( 20 ),
Validation Set( 10 ),
Test Set( 6 ),
Validation Column Type( "Formula" ),
Determine cutpoints using( "Numbers of Rows" ),
Assign Extra Rows( "To Training" ),
Go
);
dtSummary = dt << Summary( Group( :Series, :Validation ), Freq( "None" ), Weight( "None" ) );
Code Explanation:
- Open data table.
- Create validation column.
- Set cutpoint column.
- Set cutpoint batch ID.
- Define training set size.
- Define validation set size.
- Define test set size.
- Set validation column type.
- Use row numbers for cutpoints.
- Assign extra rows to training.
Example 15
Summary: Creates a validation column object with specified cutpoints, training and test sets, and validation column type, facilitating data analysis in JMP.
Code:
dt = Open("data_table.jmp");
obj = Make Validation Column(
Cutpoint Column( :Time ),
Cutpoint Batch ID( :Series ),
Training Set( 18 ),
Validation Set( 9 ),
Test Set( 9 ),
Validation Column Type( "Formula" ),
Determine cutpoints using( "Numbers of Rows" ),
Assign Extra Rows( "To Test" ),
Go
);
dtSummary = dt << Summary( Group( :Series, :Validation ), Freq( "None" ), Weight( "None" ) );
Code Explanation:
- Open data table.
- Create validation column object.
- Define cutpoint column.
- Define cutpoint batch ID.
- Set training set size.
- Set validation set size.
- Set test set size.
- Specify validation column type.
- Use numbers of rows for cutpoints.
- Assign extra rows to test set.
Example 16
Summary: Creates a validation column in a JMP data table, defining cutpoints for time and batch ID, and assigning extra rows to validation.
Code:
dt = Open("data_table.jmp");
obj = Make Validation Column(
Cutpoint Column( :Time ),
Cutpoint Batch ID( :Series ),
Training Set( 26 ),
Validation Set( 3 ),
Test Set( 7 ),
Validation Column Type( "Fixed" ),
Determine cutpoints using( "Numbers of Rows" ),
Assign Extra Rows( "To Validation" ),
Go
);
dtSummary = dt << Summary( Group( :Series, :Validation ), Freq( "None" ), Weight( "None" ) );
Code Explanation:
- Open data table.
- Create validation column.
- Define cutpoint column.
- Define cutpoint batch ID.
- Set training size.
- Set validation size.
- Set test size.
- Fix validation column type.
- Use row numbers for cutpoints.
- Assign extra rows to validation.
Example 17
Summary: Creates a validation column in a JMP data table, defining cutpoints for Time and Series, and assigning extra rows to training.
Code:
dt = Open("data_table.jmp");
obj = Make Validation Column(
Cutpoint Column( :Time ),
Cutpoint Batch ID( :Series ),
Training Set( 20 ),
Validation Set( 10 ),
Test Set( 6 ),
Validation Column Type( "Fixed" ),
Determine cutpoints using( "Numbers of Rows" ),
Assign Extra Rows( "To Training" ),
Go
);
dtSummary = dt << Summary( Group( :Series, :Validation ), Freq( "None" ), Weight( "None" ) );
Code Explanation:
- Open data table;
- Create validation column.
- Define cutpoint column.
- Define cutpoint batch ID.
- Set training size.
- Set validation size.
- Set test size.
- Fix validation column type.
- Use row numbers for cutpoints.
- Assign extra rows to training.
Example 18
Summary: Creates a validation column in a JMP data table, defining cutpoints for time and batch ID, and assigning extra rows to the test set.
Code:
dt = Open("data_table.jmp");
obj = Make Validation Column(
Cutpoint Column( :Time ),
Cutpoint Batch ID( :Series ),
Training Set( 18 ),
Validation Set( 9 ),
Test Set( 9 ),
Validation Column Type( "Fixed" ),
Determine cutpoints using( "Numbers of Rows" ),
Assign Extra Rows( "To Test" ),
Go
);
dtSummary = dt << Summary( Group( :Series, :Validation ), Freq( "None" ), Weight( "None" ) );
Code Explanation:
- Open data table.
- Create validation column.
- Define time cutpoint column.
- Define series batch ID.
- Set training set size.
- Set validation set size.
- Set test set size.
- Fix validation column type.
- Use row numbers for cutpoints.
- Assign extra rows to test set.
Example 19
Summary: Creates and configures validation columns in a JMP data table, including proportion, NRows, and fixed time/date validation, as well as elapsed time calculation.
Code:
dt = Open("data_table.jmp");
dt << Make Validation Column(
Cutpoint Column( :Date ),
Training Set( 0.5 ),
Validation Set( 0.25 ),
Test Set( 0.25 ),
New Column Name( "Proportion Validation" ),
Validation Column Type( "Formula" ),
Go
);
dt << Make Validation Column(
Cutpoint Column( :Date ),
Training Set( 48 ),
Validation Set( 24 ),
Test Set( 24 ),
New Column Name( "NRows Validation" ),
Validation Column Type( "Formula" ),
Determine cutpoints using( "Numbers of Rows" ),
Go
);
obj = dt << Make Validation Column(
Cutpoint Column( :Date ),
Training Set( 2524608000 ),
Validation Set( 2644070000 ),
Test Set( 2714660000 ),
New Column Name( "Fixed Time/Date Validation" ),
Validation Column Type( "Formula" ),
Determine cutpoints using( "Fixed Time or Date" ),
Go
);
obj = dt << Make Validation Column(
Cutpoint Column( :Date ),
Training Set( 97740000 ),
Validation Set( 70590000 ),
Test Set( 81452400 ),
New Column Name( "Elapsed Time Validation" ),
Validation Column Type( "Formula" ),
Determine cutpoints using( "Elapsed Time" ),
Go
);
dt << New Column( "Elapsed Since Time 1", Numeric, "Continuous", Formula( :Date - :Date[1] ) );
trainingCutoffRow = Loc( dt[0, "Elapsed Since Time 1"] < 97740000 );
maxTrainCut = Max( trainingCutoffRow );
Eval(
Substitute(
Expr(
dt << New Column( "Elapsed Since Time 2", Numeric, "Continuous", Formula( If( Row() > _a, :Date - :Date[_b] ) ) )
),
Expr( _a ), maxTrainCut,
Expr( _b ), maxTrainCut + 1
)
);
validationCutoffRow = Loc( dt[0, "Elapsed Since Time 2"] < 70590000 );
Code Explanation:
- Open data table;
- Create proportion validation column.
- Create NRows validation column.
- Create fixed time/date validation column.
- Create elapsed time validation column.
- Add elapsed since time 1 column.
- Identify training cutoff row.
- Find maximum training cutoff.
- Add elapsed since time 2 column.
- Identify validation cutoff row.
Example 20
Summary: Creates a validation column in a JMP data table, specifying cutpoint columns and batch IDs for efficient model screening.
Code:
dt = Open("data_table.jmp");
obj = dt << Make Validation Column( Cutpoint Column( :Time ), Cutpoint Batch ID( :Series ) );
Code Explanation:
- Open data table.
- Create validation column.
- Set cutpoint column.
- Set cutpoint batch ID.
Example 21
Summary: Creates a validation column in a JMP data table, stratified by height and grouped by age, with 5 folds for fixed validation type.
Code:
dt = Open("data_table.jmp");
dt << Make Validation Column(
Y( :weight ),
Stratification Columns( :height ),
Grouping Columns( :age ),
Number of Folds( 5 ),
Validation Column Type( "Fixed" ),
Random Seed( 123 ),
Go
);
Code Explanation:
- Open data table;
- Create validation column.
- Set response variable to weight.
- Use height for stratification.
- Group by age.
- Define 5 folds.
- Use fixed validation type.
- Set random seed to 123.
- Execute validation creation.
Example 22
Summary: Creates a validation column for data table analysis, utilizing stratification by height and grouping by age and sex.
Code:
dt = Open("data_table.jmp");
dt << Make Validation Column(
Y( :weight ),
Stratification Columns( :height ),
Grouping Columns( :age, :sex ),
Number of Folds( 5 ),
Validation Column Type( "Formula" ),
Random Seed( 123 ),
Go
);
Code Explanation:
- Open data table;
- Create validation column.
- Set response variable to weight.
- Use height for stratification.
- Group by age and sex.
- Specify 5 folds.
- Use formula for validation type.
- Set random seed to 123.
- Execute validation column creation.
Example 23
Summary: Creates a validation column with cutpoints based on weight and batch ID, allocating 60% to training set, 20% to validation set, and 20% to test set.
Code:
dt = Open("data_table.jmp");
dt << Make Validation Column(
Cutpoint Column( :weight ),
Cutpoint Batch ID( :sex ),
Training Set( 0.6 ),
Validation Set( 0.2 ),
Test Set( 0.2 ),
Go
);
dt << New Column( "Batch 2", Numeric, "Nominal", Formula( If( :sex == "F", 1, 2 ) ) );
dt << Make Validation Column(
Cutpoint Column( :weight ),
Cutpoint Batch ID( :Batch 2 ),
Training Set( 0.6 ),
Validation Set( 0.2 ),
Test Set( 0.2 ),
Go
);
oracleVal = dt[0, "Validation 2"];
Code Explanation:
- Open data table.
- Create first validation column.
- Use weight for cutpoint.
- Use sex for batch ID.
- Allocate 60% to training set.
- Allocate 20% to validation set.
- Allocate 20% to test set.
- Generate validation column.
- Add new "Batch 2" column.
- Define formula for "Batch 2".
Example 24
Summary: Process of creating a validation column with stratification and grouping, selecting rows with missing values, and identifying non-missing value rows in a JMP data table.
Code:
dt = Open("data_table.jmp");
obj = dt << Make Validation Column( Y( :X, :Y ), Stratification Columns( :OZONE, :CO, :SO2, :NO, :PM10 ), Number of Folds( 6 ), Go );
missingLoc = dt << Clear Select << Select Where(
Is Missing( :OZONE ) | Is Missing( :CO ) | Is Missing( :SO2 ) | Is Missing( :NO ) | Is Missing( :PM10 )
) << Get Selected Rows;
nonMissingLoc = dt << Invert Row Selection << Get Selected Rows;
dt[Random Index( 52, 10 ), "Region"] = "";
obj = dt << Make Validation Column( Y( :X, :Y ), Grouping Columns( :Region ), Number of Folds( 5 ), Go );
missingLoc = dt << Clear Select << Select Where( Is Missing( :Region ) ) << Get Selected Rows;
nonMissingLoc = dt << Invert Row Selection << Get Selected Rows;
Code Explanation:
- Open data table;
- Create validation column with stratification.
- Select rows with missing values.
- Identify non-missing value rows.
- Randomly select 10 rows for Region.
- Set selected Region values to empty.
- Create validation column with Region grouping.
- Select rows with missing Region.
- Identify non-missing Region rows.
Make Validation Column using Collapse Whitespace
Example 1
Summary: Creates a validation column in a data table, grouping by height and allocating training, validation, and testing sets with specified proportions, while capturing log output.
Code:
dt = Open("data_table.jmp");
lc = Collapse Whitespace(
Log Capture(
mvc = dt << Make Validation Column(
Grouping Columns( :height ),
Training Set( 0.75 ),
Validation Set( 0.15 ),
Test Set( 0.10 ),
Random Seed( 65498712 )
)
)
);
Close( dt, nosave );
Random Reset( 123456789 );
Code Explanation:
- Open data table;
- Create validation column.
- Group by height.
- Allocate 75% for training.
- Allocate 15% for validation.
- Allocate 10% for testing.
- Set random seed 65498712.
- Capture log output.
- Close dataset without saving.
- Reset random seed to 123456789.
Example 2
Summary: Creates a validation column, grouping data by height, and allocating training, validation, and test sets with a specified random seed, while capturing log output and collapsing whitespace.
Code:
dt = Open("data_table.jmp");
lc = Collapse Whitespace(
Log Capture(
mvc = dt << Make Validation Column(
Grouping Columns( :height ),
Training Set( 0.75 ),
Validation Set( 0.15 ),
Test Set( 0.10 ),
Random Seed( 65498712 )
)
)
);
Code Explanation:
- Open data table;
- Create validation column.
- Group by height.
- Allocate 75% training set.
- Allocate 15% validation set.
- Allocate 10% test set.
- Set random seed to 65498712.
- Capture log output.
- Collapse whitespace in log.
- Assign result to lc variable.
Example 3
Summary: Process of opening a data table, retrieving all columns as matrices, capturing log output, creating a validation column with sex as the cutpoint, and collapsing whitespace in the log.
Code:
dt = Open("data_table.jmp");
x = dt << Get all Columns as Matrix;
lc = Collapse Whitespace( Log Capture( obj = dt << Make Validation Column( Cutpoint Column( :sex ), Go ) ) );
x2 = dt << Get all Columns as Matrix;
Code Explanation:
- Open data table;
- Retrieve all columns as matrix.
- Capture log output.
- Create validation column.
- Use sex column as cutpoint.
- Execute validation creation.
- Collapse whitespace in log.
- Retrieve all columns again as matrix.
Example 4
Summary: Runs data table processing by opening a file, retrieving columns as matrices, creating a validation column with cutpoints and batch IDs, and collapsing whitespace in log capture.
Code:
dt = Open("data_table.jmp");
x = dt << Get all Columns as Matrix;
lc = Collapse Whitespace( Log Capture( obj = dt << Make Validation Column( Cutpoint Column( :sex ), Cutpoint Batch ID( :age ), Go ) ) );
x2 = dt << Get all Columns as Matrix;
Code Explanation:
- Open data table.
- Retrieve all columns as matrix.
- Log capture starts.
- Create validation column.
- Use sex for cutpoints.
- Use age for batch IDs.
- Log capture ends.
- Collapse whitespace in log.
- Retrieve all columns as matrix again.
- Store result in lc.
Example 5
Summary: Creates a validation column in a data table, utilizing Log Capture and Cutpoint Column to partition the data based on the sex variable.
Code:
dt = Open("data_table.jmp");
lc = Collapse Whitespace(
Log Capture(
dt << Make Validation Column(
Cutpoint Column( :sex ),
Training Set( 0.34 ),
Validation Set( 0.33 ),
Test Set( 0.33 ),
Validation Column Type( "Fixed" ),
Random Seed( 1234 ),
Go
)
)
);
Code Explanation:
- Open data table.
- Log capture begins.
- Create validation column.
- Use sex column for cutpoints.
- Set training set to 34%.
- Set validation set to 33%.
- Set test set to 33%.
- Fix validation column type.
- Set random seed to 1234.
- Execute validation creation.
Make Validation Column using Log Capture
Example 1
Summary: Creates a validation column in JMP, utilizing Make Validation Column and Log Capture to set training, validation, and test sets, while grouping randomly by height and setting a random seed.
Code:
dt = Open("data_table.jmp");
lc = Log Capture(
mvc = dt << Make Validation Column(
Training Set( 0.75 ),
Validation Set( 0.15 ),
Test Set( 0.10 ),
Grouped Random( :height ),
Random Seed( 65498712 )
)
);
oracle_validation = [0, 0, 0, 2, 0, 1, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 1, 0, 2, 0, 2, 0, 1, 0, 0, 0, 0
];
Code Explanation:
- Open data table;
- Start log capture.
- Create validation column.
- Set training set to 75%.
- Set validation set to 15%.
- Set test set to 10%.
- Group randomly by height.
- Set random seed to 65498712.
- End log capture.
- Define oracle validation array.
Example 2
Summary: Creates a validation column in a data table, setting training, validation, and test set sizes, and using the sex column as a cutpoint.
Code:
dt = Open("data_table.jmp");
Log Capture( dt << Make Validation Column( Training Set( 0.34 ), Validation Set( 0.33 ), Test Set( 0.33 ), Cutpoint( :sex ) ) );
Code Explanation:
- Open data table.
- Create validation column.
- Set training set size.
- Set validation set size.
- Set test set size.
- Use sex column for cutpoint.
Example 3
Summary: Creates a validation column in a data table, defining training, validation, and test sets with specific proportions and using height as the cutpoint.
Code:
dt = Open("data_table.jmp");
Log Capture( dt << Make Validation Column( Training Set( 0.34 ), Validation Set( 0.33 ), Test Set( 0.33 ), Cutpoint( :height ) ) );
Code Explanation:
- Open data table;
- Create validation column.
- Define training set as 34%.
- Define validation set as 33%.
- Define test set as 33%.
- Use height for cutpoint.
Example 4
Summary: Creates a validation column in JMP, utilizing cutpoints from the 'height' variable and allocating specific proportions for training, validation, and testing sets.
Code:
dt = Open("data_table.jmp");
Log Capture(
dt << Make Validation Column(
Cutpoint Column( :height ),
Training Set( 0.34 ),
Validation Set( 0.33 ),
Test Set( 0.33 ),
Validation Column Type( "Fixed" ),
Random Seed( 1234 ),
Go
)
);
Code Explanation:
- Open data table;
- Start log capture.
- Create validation column.
- Use "height" for cutpoints.
- Allocate 34% for training.
- Allocate 33% for validation.
- Allocate 33% for testing.
- Set validation type to fixed.
- Use seed 1234 for randomness.
- Execute validation creation.
Column
Example 1
Summary: Runs the setup for a multivariate correlations analysis with mahalanobis distances by opening a data table, setting column modeling type, capturing log output, and defining training, validation, and test sets.
Code:
dt = Open("data_table.jmp");
Column( dt, "sex" ) << Set Modeling Type( "Multiple Response" );
Log Capture( dt << Make Validation Column( Training Set( 0.34 ), Validation Set( 0.33 ), Test Set( 0.33 ), Cutpoint( :sex ) ) );
Code Explanation:
- Open data table.
- Set column modeling type.
- Capture log output.
- Create validation column.
- Define training set size.
- Define validation set size.
- Define test set size.
- Specify cutpoint column.
Example 2
Summary: Creates a validation column for multivariate correlations analysis with mahalanobis distances, utilizing the 'sex' column as a cutpoint.
Code:
dt = Open("data_table.jmp");
Column( dt, "sex" ) << Set Modeling Type( "Unstructured Text" );
Log Capture( dt << Make Validation Column( Training Set( 0.34 ), Validation Set( 0.33 ), Test Set( 0.33 ), Cutpoint( :sex ) ) );
Code Explanation:
- Open data table;
- Set "sex" column as unstructured text.
- Create validation column.
- Allocate 34% data for training.
- Allocate 33% data for validation.
- Allocate 33% data for testing.
- Use "sex" column as cutpoint.
Example 3
Summary: Creates a validation column for data table 'Body Fat.jmp' based on sex, utilizing Log Capture and Make Validation Column
Code:
dt = Open("data_table.jmp");
Column( dt, "sex" ) << Set Modeling Type( "None" );
Log Capture( dt << Make Validation Column( Training Set( 0.34 ), Validation Set( 0.33 ), Test Set( 0.33 ), Cutpoint( :sex ) ) );
Code Explanation:
- Open data table.
- Set sex column modeling type.
- Capture log output.
- Create validation column.
Example 4
Summary: Formats a column and creation of a validation column with a specified cutpoint, utilizing Log Capture for data analysis.
Code:
dt = Open("data_table.jmp");
Column( dt, "height" ) << Format( "Best", 12 );
Log Capture( dt << Make Validation Column( Training Set( 0.34 ), Validation Set( 0.33 ), Test Set( 0.33 ), Cutpoint( :height ) ) );
Code Explanation:
- Open data table.
- Format height column.
- Log validation column creation.
- Create validation column.
- Define training set size.
- Define validation set size.
- Define test set size.
- Set cutpoint using height.
Example 5
Summary: Creates a validation column for ordinal data, utilizing Log Capture to generate training, validation, and test sets with specified proportions.
Code:
dt = Open("data_table.jmp");
Column( dt, "height" ) << Set Modeling Type( "Ordinal" );
Log Capture( dt << Make Validation Column( Training Set( 0.34 ), Validation Set( 0.33 ), Test Set( 0.33 ), Cutpoint( :height ) ) );
Code Explanation:
- Open data table;
- Set height column as Ordinal.
- Log validation column creation.
- Create training set (34%).
- Create validation set (33%).
- Create test set (33%).
- Use height for cutpoint.
Example 6
Summary: Process of setting an ordinal modeling type and formatting a column, while also creating a validation column with specified training, validation, and test set sizes.
Code:
dt = Open("data_table.jmp");
Column( dt, "height" ) << Set Modeling Type( "Ordinal" );
Column( dt, "height" ) << Format( "Best", 12 );
Log Capture( dt << Make Validation Column( Training Set( 0.34 ), Validation Set( 0.33 ), Test Set( 0.33 ), Cutpoint( :height ) ) );
Code Explanation:
- Open data table.
- Set height column as ordinal.
- Format height column.
- Log capture output.
- Create validation column.
- Define training set size.
- Define validation set size.
- Define test set size.
- Use height column cutpoint.
Example 7
Summary: Creates a validation column for multivariate correlations analysis with mahalanobis distances, utilizing the Open() function to load data and setting the 'height' column as nominal.
Code:
dt = Open("data_table.jmp");
Column( dt, "height" ) << Set Modeling Type( "Nominal" );
Log Capture( dt << Make Validation Column( Training Set( 0.34 ), Validation Set( 0.33 ), Test Set( 0.33 ), Cutpoint( :height ) ) );
Code Explanation:
- Open data table;
- Set height column as nominal.
- Capture log output.
- Create validation column.
- Define training set size.
- Define validation set size.
- Define test set size.
- Use height for cutpoint.
Example 8
Summary: Creates a validation column with training, validation, and test sets for the 'height' column in a JMP data table.
Code:
dt = Open("data_table.jmp");
Column( dt, "height" ) << Set Modeling Type( "Nominal" );
Column( dt, "height" ) << Format( "Best", 12 );
Log Capture( dt << Make Validation Column( Training Set( 0.34 ), Validation Set( 0.33 ), Test Set( 0.33 ), Cutpoint( :height ) ) );
Code Explanation:
- Open data table;
- Set "height" modeling type to nominal.
- Format "height" column.
- Log capture output.
- Create validation column.
- Define training set as 34%.
- Define validation set as 33%.
- Define test set as 33%.
- Use "height" as cutpoint.
Example 9
Summary: Creates a validation column with specified proportions and logs capture output for further analysis.
Code:
dt = Open("data_table.jmp");
Column( dt, "height" ) << Set Modeling Type( "None" );
Log Capture( dt << Make Validation Column( Training Set( 0.34 ), Validation Set( 0.33 ), Test Set( 0.33 ), Cutpoint( :height ) ) );
Code Explanation:
- Open data table;
- Set height column modeling type to None.
- Create validation column with specified proportions.
- Log capture output.
Example 10
Summary: Prepares a data table for modeling by setting the height column's modeling type, formatting its values, and creating a validation column with specified training, validation, and test set sizes.
Code:
dt = Open("data_table.jmp");
Column( dt, "height" ) << Set Modeling Type( "None" );
Column( dt, "height" ) << Format( "Best", 12 );
Log Capture( dt << Make Validation Column( Training Set( 0.34 ), Validation Set( 0.33 ), Test Set( 0.33 ), Cutpoint( :height ) ) );
Code Explanation:
- Open table.
- Set height modeling type.
- Format height column.
- Capture log output.
- Create validation column.
- Define training set size.
- Define validation set size.
- Define test set size.
- Use height for cutpoint.
Example 11
Summary: Creates a validation column with multiple response modeling for categorical data, utilizing log capture and random seed control.
Code:
dt = Open("data_table.jmp");
Column( dt, "sex" ) << Set Modeling Type( "Multiple Response" );
lc = Collapse Whitespace(
Log Capture(
dt << Make Validation Column(
Cutpoint Column( :sex ),
Training Set( 0.34 ),
Validation Set( 0.33 ),
Test Set( 0.33 ),
Validation Column Type( "Fixed" ),
Random Seed( 1234 ),
Go
)
)
);
Code Explanation:
- Open data table.
- Set modeling type for "sex".
- Log capture begins.
- Create validation column.
- Specify cutpoint column.
- Define training set size.
- Define validation set size.
- Define test set size.
- Set validation column type.
- Set random seed.
Example 12
Summary: Creates a validation column with cutpoints and training, validation, and test sets for text data analysis.
Code:
dt = Open("data_table.jmp");
Column( dt, "sex" ) << Set Modeling Type( "Unstructured Text" );
lc = Collapse Whitespace(
Log Capture(
dt << Make Validation Column(
Cutpoint Column( :sex ),
Training Set( 0.34 ),
Validation Set( 0.33 ),
Test Set( 0.33 ),
Validation Column Type( "Fixed" ),
Random Seed( 1234 ),
Go
)
)
);
Code Explanation:
- Open data table.
- Set modeling type for column.
- Capture log output.
- Create validation column.
- Define cutpoint column.
- Set training set proportion.
- Set validation set proportion.
- Set test set proportion.
- Fix validation column type.
- Set random seed.
Example 13
Summary: Creates a validation column using Log Capture and Cutpoint Column, with specific allocation to training, validation, and test sets.
Code:
dt = Open("data_table.jmp");
Column( dt, "sex" ) << Set Modeling Type( "None" );
lc = Collapse Whitespace(
Log Capture(
dt << Make Validation Column(
Cutpoint Column( :sex ),
Training Set( 0.34 ),
Validation Set( 0.33 ),
Test Set( 0.33 ),
Validation Column Type( "Fixed" ),
Random Seed( 1234 ),
Go
)
)
);
Code Explanation:
- Open data table;
- Set sex column modeling type to None.
- Collapse whitespace.
- Log capture start.
- Create validation column.
- Use sex column for cutpoints.
- Allocate 34% to training set.
- Allocate 33% to validation set.
- Allocate 33% to test set.
- Set validation type to Fixed.
- Use seed 1234 for randomness.
- Execute validation column creation.
Example 14
Summary: Creates a validation column for data table 'data_table.jmp' with specified cutpoints, training, validation, and test set sizes, and random seed.
Code:
dt = Open("data_table.jmp");
Column( dt, "height" ) << Format( "Best", 12 );
Log Capture(
dt << Make Validation Column(
Cutpoint Column( :height ),
Training Set( 0.34 ),
Validation Set( 0.33 ),
Test Set( 0.33 ),
Validation Column Type( "Fixed" ),
Random Seed( 1234 ),
Go
)
);
Code Explanation:
- Open data table.
- Format height column.
- Capture log output.
- Create validation column.
- Define cutpoint column.
- Set training set size.
- Set validation set size.
- Set test set size.
- Fix validation column type.
- Set random seed.
Example 15
Summary: Creates a validation column for an ordinal 'height' variable in a JMP data table, using log capture and specifying cutpoints, training, validation, and test sets.
Code:
dt = Open("data_table.jmp");
Column( dt, "height" ) << Set Modeling Type( "Ordinal" );
Log Capture(
dt << Make Validation Column(
Cutpoint Column( :height ),
Training Set( 0.34 ),
Validation Set( 0.33 ),
Test Set( 0.33 ),
Validation Column Type( "Fixed" ),
Random Seed( 1234 ),
Go
)
);
Code Explanation:
- Open data table;
- Set height column type to ordinal.
- Begin log capture.
- Create validation column.
- Specify height as cutpoint column.
- Allocate 34% to training set.
- Allocate 33% to validation set.
- Allocate 33% to test set.
- Fix validation column type.
- Set random seed to 1234.
- Execute validation column creation.
Example 16
Summary: Creates a validation column for the 'height' column in a data table, using cutpoints and allocating data to training, validation, and test sets.
Code:
dt = Open("data_table.jmp");
Column( dt, "height" ) << Set Modeling Type( "Ordinal" );
Column( dt, "height" ) << Format( "Best", 12 );
Log Capture(
dt << Make Validation Column(
Cutpoint Column( :height ),
Training Set( 0.34 ),
Validation Set( 0.33 ),
Test Set( 0.33 ),
Validation Column Type( "Fixed" ),
Random Seed( 1234 ),
Go
)
);
Code Explanation:
- Open data table;
- Set "height" column as Ordinal.
- Format "height" column as Best, width 12.
- Begin log capture.
- Create validation column for "height".
- Use "height" as cutpoint column.
- Allocate 34% data to training set.
- Allocate 33% data to validation set.
- Allocate 33% data to test set.
- Fix validation column type.
- Set random seed to 1234.
- Execute validation column creation.
Example 17
Summary: Creates a validation column with cutpoints based on the 'height' column, allocating 34% for training, 33% for validation, and 33% for testing, while fixing the validation column type and setting a random seed.
Code:
dt = Open("data_table.jmp");
Column( dt, "height" ) << Set Modeling Type( "Nominal" );
Log Capture(
dt << Make Validation Column(
Cutpoint Column( :height ),
Training Set( 0.34 ),
Validation Set( 0.33 ),
Test Set( 0.33 ),
Validation Column Type( "Fixed" ),
Random Seed( 1234 ),
Go
)
);
Code Explanation:
- Open data table;
- Set height column to Nominal.
- Capture log output.
- Create validation column.
- Use height for cutpoints.
- Allocate 34% for training.
- Allocate 33% for validation.
- Allocate 33% for testing.
- Fix validation column type.
- Set random seed to 1234.
Example 18
Summary: Creates a validation column with cutpoints for the 'height' column in a data table, utilizing log capture and random seed.
Code:
dt = Open("data_table.jmp");
Column( dt, "height" ) << Set Modeling Type( "Nominal" );
Column( dt, "height" ) << Format( "Best", 12 );
Log Capture(
dt << Make Validation Column(
Cutpoint Column( :height ),
Training Set( 0.34 ),
Validation Set( 0.33 ),
Test Set( 0.33 ),
Validation Column Type( "Fixed" ),
Random Seed( 1234 ),
Go
)
);
Code Explanation:
- Open data table.
- Set height column to nominal.
- Format height column.
- Start log capture.
- Create validation column.
- Define cutpoint column.
- Set training set proportion.
- Set validation set proportion.
- Set test set proportion.
- Fix validation column type.
Example 19
Summary: Creates a validation column for multivariate correlations analysis with mahalanobis distances, using the 'height' column as cutpoints and allocating specific proportions for training, validation, and testing.
Code:
dt = Open("data_table.jmp");
Column( dt, "height" ) << Set Modeling Type( "None" );
Log Capture(
dt << Make Validation Column(
Cutpoint Column( :height ),
Training Set( 0.34 ),
Validation Set( 0.33 ),
Test Set( 0.33 ),
Validation Column Type( "Fixed" ),
Random Seed( 1234 ),
Go
)
);
Code Explanation:
- Open data table;
- Set "height" column modeling type to "None".
- Start log capture.
- Create validation column.
- Use "height" for cutpoints.
- Allocate 34% for training.
- Allocate 33% for validation.
- Allocate 33% for testing.
- Set validation type to "Fixed".
- Use random seed 1234.
Example 20
Summary: Creates a validation column in a data table, using the height column as a cutpoint and allocating specific percentages for training, validation, and test sets.
Code:
dt = Open("data_table.jmp");
Column( dt, "height" ) << Set Modeling Type( "None" );
Column( dt, "height" ) << Format( "Best", 12 );
Log Capture(
dt << Make Validation Column(
Cutpoint Column( :height ),
Training Set( 0.34 ),
Validation Set( 0.33 ),
Test Set( 0.33 ),
Validation Column Type( "Fixed" ),
Random Seed( 1234 ),
Go
)
);
Code Explanation:
- Open data table;
- Set height column modeling type to None.
- Format height column as Best with width 12.
- Start log capture.
- Create validation column in data table.
- Use height column as cutpoint.
- Allocate 34% for training set.
- Allocate 33% for validation set.
- Allocate 33% for test set.
- Fix validation column type.
Example 21
Summary: Runs the creation and validation of a data table, including setting modeling types, making validation columns, relaunching analysis, and generating reports.
Code:
dt = Open("data_table.jmp");
Column( dt, "age" ) << Set Modeling Type( "Continuous" );
obj = dt << Make Validation Column( Cutpoint Column( :height ), Cutpoint Batch ID( :age ) );
rpt = Report( obj );
obj2 = dt << Make Validation Column;
wind = obj2 << Relaunch Analysis;
obj2 << close window;
wind = Window( "Make Validation Column" );
Code Explanation:
- Open data table;
- Set age column to continuous.
- Create validation column using height.
- Assign cutpoint batch ID by age.
- Generate report from validation object.
- Create another validation column.
- Relaunch analysis for new object.
- Close the new validation window.
- Open Make Validation Column window.
N Col
Example 1
Summary: Runs data validation and grouping operations by creating two validation columns with formula and fixed types, utilizing the Log Capture and Collapse Whitespace functions.
Code:
dt = Open("data_table.jmp");
p = N Col( dt );
lc = Collapse Whitespace(
Log Capture( dt << Make Validation Column( Grouping Columns( :height, :weight ), Validation Column Type( "Formula" ), Go ) )
);
lc2 = Collapse Whitespace(
Log Capture( dt << Make Validation Column( Grouping Columns( :height, :weight ), Validation Column Type( "Fixed" ), Go ) )
);
Code Explanation:
- Open data table;
- Count number of columns.
- Capture log for formula validation.
- Collapse whitespace in log.
- Capture log for fixed validation.
- Collapse whitespace in log.
Example 2
Summary: Creates log captures for formula and fixed validation in a data table, utilizing N Col and Collapse Whitespace functions.
Code:
dt = Open("data_table.jmp");
p = N Col( dt );
lc = Collapse Whitespace(
Log Capture( dt << Make Validation Column( Grouped Random( :height, :weight ), Validation Column Type( "Formula" ), Go ) )
);
lc2 = Collapse Whitespace(
Log Capture( dt << Make Validation Column( Grouped Random( :height, :weight ), Validation Column Type( "Fixed" ), Go ) )
);
Code Explanation:
- Open data table;
- Count columns in dataset.
- Create log capture for formula validation.
- Generate grouped random validation column.
- Set validation column type to formula.
- Execute validation column creation.
- Collapse whitespace in log capture.
- Create log capture for fixed validation.
- Generate grouped random validation column.
- Set validation column type to fixed.
Make Validation Column using New Column
Example 1
Summary: Creates a validation column in JMP, using a formula to identify batches and generate cutpoints based on the Date column.
Code:
dt = Open("data_table.jmp");
dt << New Column( "Batch", Character, "Nominal", Formula( Char( Mod( Row(), 3 ) + 1 ) ) );
obj = dt << Make Validation Column( Cutpoint Column( :Date ), Cutpoint Batch ID( :Batch ) );
Code Explanation:
- Open data table.
- Create new column "Batch".
- Set column type to Character.
- Define column modeling as Nominal.
- Assign formula for batch identification.
- Generate validation column.
- Use Date column for cutpoints.
- Apply Batch column for batch IDs.
Example 2
Summary: Creates validation columns with grouping and random category assignments, utilizing JMP's data manipulation capabilities.
Code:
dt = Open("data_table.jmp");
dt << New Column( "One Group", Character, "Nominal", Formula( Random Category( 0.5, "A", "A" ) ) );
dt << New Column( "Two Groups", Character, "Nominal", Formula( Random Category( 0.5, "A", "B" ) ) );
dt << New Column( "Three Groups", Character, "Nominal", Formula( Random Category( 0.3333, "A", 0.3333, "B", "C" ) ) );
dt << New Column( "Four Groups", Character, "Nominal", Formula( Random Category( 0.25, "A", 0.25, "B", 0.25, "C", "D" ) ) );
dt << New Column( "Missing", Character, "Nominal" );
lc = Collapse Whitespace( Log Capture( dt << Make Validation Column( Y( :weight ), Grouping Columns( :One Group ) ) ) );
lc2 = Collapse Whitespace( Log Capture( dt << Make Validation Column( Y( :weight ), Grouping Columns( :Two Groups ) ) ) );
lc3 = Collapse Whitespace( Log Capture( dt << Make Validation Column( Y( :weight ), Grouping Columns( :Three Groups ) ) ) );
lc4 = Collapse Whitespace( Log Capture( dt << Make Validation Column( Y( :weight ), Grouping Columns( :Missing ) ) ) );
dt << Make Validation Column( Y( :weight ), Grouping Columns( :Four Groups ), Go );
Close( dt, nosave );
Random Reset( 123456789 );
Code Explanation:
- Open data table.
- Add "One Group" column.
- Add "Two Groups" column.
- Add "Three Groups" column.
- Add "Four Groups" column.
- Add "Missing" column.
- Create validation column for "One Group".
- Create validation column for "Two Groups".
- Create validation column for "Three Groups".
- Create validation column for "Four Groups".
Make Validation Column using For
Example 1
Summary: Creates validation columns for a specified data table, utilizing random sampling and cutpoint determination using row numbers.
Code:
dt = Open("data_table.jmp");
n = 46;
For( i = 1, i <= 5, i++,
randTraining = Random Integer( 0, n );
randValidation = Random Integer( 0, n - randTraining );
randTest = n - randTraining - randValidation;
obj = dt << Make Validation Column(
Cutpoint Column( :Time ),
Training Set( Eval( randTraining ) ),
Validation Set( Eval( randValidation ) ),
Test Set( Eval( randTest ) ),
Determine cutpoints using( "Numbers of Rows" )
);
rpt = Report( obj );
obj << close window;
);
Code Explanation:
- Open data table.
- Set variable
nto 46. - Loop 5 times.
- Generate random training size.
- Generate random validation size.
- Calculate test size.
- Create validation column.
- Define cutpoint column.
- Set training set size.
- Set validation set size.
- Set test set size.
- Use row numbers for cutpoints.
- Generate report from object.
- Close object window.
Example 2
Summary: Creates validation columns with random training, validation, and test set sizes for 5 iterations in a specified data table.
Code:
dt = Open("data_table.jmp");
n = 96;
For( i = 1, i <= 5, i++,
randTraining = Random Integer( 0, n );
randValidation = Random Integer( 0, n - randTraining );
randTest = n - randTraining - randValidation;
obj = dt << Make Validation Column(
Cutpoint Column( :Date ),
Training Set( Eval( randTraining ) ),
Validation Set( Eval( randValidation ) ),
Test Set( Eval( randTest ) ),
Determine cutpoints using( "Numbers of Rows" )
);
rpt = Report( obj );
obj << close window;
);
Code Explanation:
- Open data table.
- Define sample size.
- Start loop for 5 iterations.
- Generate random training set size.
- Generate random validation set size.
- Calculate test set size.
- Create validation column.
- Specify cutpoint column.
- Define training set size.
- Define validation set size.
- Define test set size.
- Use row numbers for cutpoints.
- Generate report.
- Close window.
Example 3
Summary: Creates validation columns for a specified data table, utilizing random sampling and cutpoints to define training, validation, and test sets.
Code:
dt = Open("data_table.jmp");
n = 36;
For( i = 1, i <= 5, i++,
randTraining = Random Integer( 0, n );
randValidation = Random Integer( 0, n - randTraining );
randTest = n - randTraining - randValidation;
obj = dt << Make Validation Column(
Cutpoint Column( :Time ),
Cutpoint Batch ID( :Series ),
Training Set( Eval( randTraining ) ),
Validation Set( Eval( randValidation ) ),
Test Set( Eval( randTest ) ),
Determine cutpoints using( "Numbers of Rows" )
);
rpt = Report( obj );
obj << close window;
);
Close( dt, nosave );
Random Reset( 123 );
countFailures = 0;
Code Explanation:
- Open data table.
- Define variable
n. - Loop 5 times.
- Generate random training size.
- Generate random validation size.
- Calculate test size.
- Create validation column.
- Get report object.
- Close validation window.
- Close data table without saving.
Example 4
Summary: Generates a validation column for a specified data table, utilizing random sampling to determine training, validation, and test set sizes based on elapsed time.
Code:
For( sim = 1, sim <= 3, sim++,
dt = Open("data_table.jmp");
elapsedMax = 249782400;
val1 = Random Uniform( 0, elapsedMax );
val2 = Random Uniform( 0, elapsedMax - val1 );
val3 = elapsedMax - val1 - val2;
obj = dt << Make Validation Column(
Cutpoint Column( :Date ),
Training Set( val1 ),
Validation Set( val2 ),
Test Set( val3 ),
Determine cutpoints using( "Elapsed Time" )
);
rpt = Report( obj );
valUsed1 = rpt[Number Edit Box( 1 )] << Get;
valUsed2 = rpt[Number Edit Box( 2 )] << Get;
valUsed3 = rpt[Number Edit Box( 3 )] << Get;
obj << close window;
Close( dt, nosave );
);
Code Explanation:
- Loop 3 times.
- Open data_table data
- Define maximum elapsed time.
- Generate random validation set size.
- Generate random test set size.
- Calculate training set size.
- Create validation column.
- Use elapsed time for cutpoints.
- Retrieve validation set size.
- Retrieve test set size.
- Retrieve training set size.
- Close validation report window.
- Close data table without saving.
Example 5
Summary: Generates a distribution analysis for continuous variables in a specified data table using the Distribution platform, with random training, validation, and test sets.
Code:
dt = Open("data_table.jmp");
For( i = 1, i <= 5, i++,
randTraining = Min( dt[0, "Time"] );
randValidation = Random Integer( Min( dt[0, "Time"] ), Max( dt[0, "Time"] ) );
randTest = Random Integer( randValidation, Max( dt[0, "Time"] ) );
valColType = {"Fixed", "Formula"}[Random Integer( 1, 2 )];
Eval(
Substitute(
Expr(
obj = Make Validation Column(
Cutpoint Column( :Time ),
Training Set( _randTraining ),
Validation Set( _randValidation ),
Test Set( _randTest ),
Validation Column Type( _valColType ),
Determine cutpoints using( "Fixed Time or Date" )
)
),
Expr( _randTraining ), randTraining,
Expr( _randValidation ), randValidation,
Expr( _randTest ), randTest,
Expr( _valColType ), valColType
)
);
rpt = Report( obj );
obj << close window;
);
Code Explanation:
- Open data table.
- Loop 5 times.
- Generate random training start.
- Generate random validation end.
- Generate random test end.
- Select random validation column type.
- Create validation column.
- Assign generated values to parameters.
- Generate report from object.
- Close report window.
Example 6
Summary: Generates a distribution analysis for continuous variables in a specified data table using the Distribution platform, with random training, validation, and test dates, and randomly selected validation column types.
Code:
dt = Open("data_table.jmp");
For( i = 1, i <= 5, i++,
randTraining = Min( dt[0, "Date"] );
randValidation = Random Integer( Min( dt[0, "Date"] ), Max( dt[0, "Date"] ) );
randTest = Random Integer( randValidation, Max( dt[0, "Date"] ) );
valColType = {"Fixed", "Formula"}[Random Integer( 1, 2 )];
Eval(
Substitute(
Expr(
obj = Make Validation Column(
Cutpoint Column( :Date ),
Training Set( _randTraining ),
Validation Set( _randValidation ),
Test Set( _randTest ),
Validation Column Type( _valColType ),
Determine cutpoints using( "Fixed Time or Date" )
)
),
Expr( _randTraining ), randTraining,
Expr( _randValidation ), randValidation,
Expr( _randTest ), randTest,
Expr( _valColType ), valColType
)
);
rpt = Report( obj );
obj << close window;
);
Code Explanation:
- Open data table.
- Loop 5 times.
- Set random training date.
- Set random validation date.
- Set random test date.
- Choose validation column type randomly.
- Create validation column.
- Generate report.
- Close report window.
- Repeat loop.
Example 7
Summary: Generates a distribution analysis for continuous variables in a specified data table using the Distribution platform, with options to customize validation column type and dates.
Code:
dt = Open("data_table.jmp");
For( i = 1, i <= 5, i++,
randTraining = Min( dt[0, "DATE"] );
randValidation = Random Integer( Min( dt[0, "DATE"] ), Max( dt[0, "DATE"] ) );
randTest = Random Integer( randValidation, Max( dt[0, "DATE"] ) );
valColType = {"Fixed", "Formula"}[Random Integer( 1, 2 )];
Eval(
Substitute(
Expr(
obj = Make Validation Column(
Cutpoint Column( :Date ),
Training Set( _randTraining ),
Validation Set( _randValidation ),
Test Set( _randTest ),
Validation Column Type( _valColType ),
Determine cutpoints using( "Fixed Time or Date" )
)
),
Expr( _randTraining ), randTraining,
Expr( _randValidation ), randValidation,
Expr( _randTest ), randTest,
Expr( _valColType ), valColType
)
);
rpt = Report( obj );
obj << close window;
);
Code Explanation:
- Open data_table data
- Loop 5 times.
- Set minimum date for training.
- Generate random validation date.
- Generate random test date.
- Choose random validation column type.
- Create validation column object.
- Substitute variables in expression.
- Generate report from object.
- Close validation column window.
Example 8
Summary: Creates a validation column in a data table, stratified by height, with random seed generation and training/validation/test set ratios.
Code:
dt = Open("data_table.jmp");
For( i = 1, i <= 10, i++,
myseed = Random Integer( 9876543621, 9876543621 + 1e9 );
dt << Make Validation Column(
Stratification Columns( :height ),
Training Set( 0.75 ),
Validation Set( 0.25 ),
Test Set( 0 ),
Random Seed( myseed ),
Go
);
);
x = dt[0, 6 :: 15];
Close( dt, nosave );
Random Reset( 123456789 );
Code Explanation:
- Open data table.
- Loop 10 times.
- Generate random seed.
- Create validation column.
- Stratify by height.
- Set training ratio to 0.75.
- Set validation ratio to 0.25.
- Set test ratio to 0.
- Use random seed.
- Execute validation creation.
- Extract columns 6 to 15.
- Close table without saving.
- Reset random seed.
Example 9
Summary: Creates a validation column with stratification by height, training set ratio of 75%, and test set ratio of 0% in a specified data table.
Code:
dt = Open("data_table.jmp");
For( i = 1, i <= 10, i++,
myseed = Random Integer( -123456789, -1 );
dt << Make Validation Column(
Stratification Columns( :height ),
Training Set( 0.75 ),
Validation Set( 0.25 ),
Test Set( 0 ),
Random Seed( myseed ),
Go
);
);
x = dt[0, 6 :: 15];
Code Explanation:
- Open data table.
- Loop 10 times.
- Generate random seed.
- Create validation column.
- Stratify by height.
- Set training ratio to 75%.
- Set validation ratio to 25%.
- Set test set to 0%.
- Use random seed.
- Execute validation creation.
Example 10
Summary: Creates a validation column in a data table, stratifying by sensor measurements and setting training and validation ratios.
Code:
dt = Open("data_table.jmp");
For( i = 1, i <= 10, i++,
dt << Make Validation Column(
Stratification Columns( Column Group( "Sensor Measurements" ) ),
Training Set( 0.75 ),
Validation Set( 0.25 ),
Test Set( 0 ),
Random Seed( . ),
Go
)
);
x = dt[0, 40 :: 49];
Code Explanation:
- Open data table;
- Loop 10 times.
- Create validation column.
- Stratify by sensor measurements.
- Set training ratio to 75%.
- Set validation ratio to 25%.
- No test set.
- Use random seed.
- Execute validation creation.
- Assign columns 40-49 to x.
Example 11
Summary: Creates a validation column with stratification by sensor measurements, utilizing 75% training and 25% validation sets.
Code:
dt = Open("data_table.jmp");
For( i = 1, i <= 10, i++,
dt << Make Validation Column(
Stratification Columns( Column Group( "Sensor Measurements" ) ),
Training Set( 0.75 ),
Validation Set( 0.25 ),
Test Set( 0 ),
Random Seed( 0 ),
Go
)
);
x = dt[0, 40 :: 49];
Code Explanation:
- Open data table;
- Loop 10 times.
- Create validation column.
- Stratify by sensor measurements.
- Set training ratio to 75%.
- Set validation ratio to 25%.
- No test set.
- Use random seed 0.
- Execute validation creation.
- Assign columns 40-49 to x.
Example 12
Summary: Creates validation columns for a specified data table, utilizing random training and test set sizes to determine cutpoints.
Code:
dt = Open("data_table.jmp");
n = 36;
For( i = 1, i <= 5, i++,
randTraining = Random Integer( 0, n );
randValidation = Random Integer( 0, n - randTraining );
randTest = n - randTraining - randValidation;
obj = dt << Make Validation Column(
Cutpoint Column( :Time ),
Cutpoint Batch ID( :Series ),
Training Set( Eval( randTraining ) ),
Validation Set( Eval( randValidation ) ),
Test Set( Eval( randTest ) ),
Determine cutpoints using( "Numbers of Rows" )
);
rpt = Report( obj );
obj << close window;
);
Code Explanation:
- Open data table;
- Set n to 36.
- Loop 5 times.
- Generate random training size.
- Generate random validation size.
- Calculate test size.
- Create validation column.
- Define cutpoint column.
- Define cutpoint batch ID.
- Set training set size.
- Set validation set size.
- Set test set size.
- Use row numbers for cutpoints.
- Generate report.
- Close window.
Example 13
Summary: Creates a validation column in a data table, stratified by height and with random seed generation.
Code:
dt = Open("data_table.jmp");
For( i = 1, i <= 10, i++,
myseed = Random Integer( 9876543621, 9876543621 + 1e9 );
dt << Make Validation Column(
Stratification Columns( :height ),
Training Set( 0.75 ),
Validation Set( 0.25 ),
Test Set( 0 ),
Random Seed( myseed ),
Go
);
);
x = dt[0, 6 :: 15];
Code Explanation:
- Open data table;
- Loop 10 times.
- Generate random seed.
- Create validation column.
- Stratify by height.
- Set training set to 75%.
- Set validation set to 25%.
- Set test set to 0%.
- Use generated seed.
- Execute validation creation.
Example 14
Summary: Creates validation columns for a specified data table, utilizing random row selection and exclusion to generate distinct groups.
Code:
For( sim = 1, sim <= 5, sim++,
dt = Open("data_table.jmp");
dt << Select Randomly( 0.2 ) << Exclude( 1 );
dt << Make Validation Column(
Grouping Columns( :SITEID ),
Training Set( 3 ),
Validation Set( 1 ),
Test Set( 0 ),
New Column Name( "Group Valid" ),
Validation Column Type( "Formula" ),
Go
);
excludedRows = dt << Get Excluded Rows;
nonExcludedRows = dt << Select Excluded << Invert Row Selection << Get Selected Rows;
myGroups = Associative Array( dt[0, "SITEID"] ) << Get Keys;
For( j = 1, j <= Length( myGroups ), j++,
validVals = dt[nonExcludedRows[Loc( dt[nonExcludedRows, "SITEID"], myGroups[j] )], "Group Valid"]
);
Close( dt, nosave );
);
Code Explanation:
- Loop 5 times.
- Open data table;
- Randomly select 20% rows.
- Exclude selected rows.
- Create validation column.
- Get excluded rows.
- Get non-excluded rows.
- Get unique SITEID values.
- Loop through each SITEID.
- Retrieve validation values for non-excluded rows.
- Close dataset without saving.
Example 15
Summary: Creates a validation column for a specified data table, utilizing random selection and exclusion to generate training, validation, and test sets.
Code:
For( sim = 1, sim <= 5, sim++,
dt = Open("data_table.jmp");
dt << Select Randomly( 0.2 ) << Exclude( 1 );
dt << Make Validation Column(
Grouping Columns( :SITEID ),
Training Set( 3 ),
Validation Set( 1 ),
Test Set( 0 ),
New Column Name( "Group Valid" ),
Validation Column Type( "Fixed" ),
Go
);
excludedRows = dt << Get Excluded Rows;
nonExcludedRows = dt << Select Excluded << Invert Row Selection << Get Selected Rows;
myGroups = Associative Array( dt[0, "SITEID"] ) << Get Keys;
For( j = 1, j <= Length( myGroups ), j++,
validVals = dt[nonExcludedRows[Loc( dt[nonExcludedRows, "SITEID"], myGroups[j] )], "Group Valid"]
);
Close( dt, nosave );
);
Code Explanation:
- Loop 5 times.
- Open data table.
- Select rows randomly.
- Exclude selected rows.
- Create validation column.
- Get excluded rows.
- Get non-excluded rows.
- Get unique site IDs.
- Loop through each site ID.
- Retrieve validation values for non-excluded rows.
Example 16
Summary: Process of creating a stratified validation column for a specified data table, utilizing random sampling and exclusion techniques.
Code:
For( sim = 1, sim <= 5, sim++,
dt = Open("data_table.jmp");
dt << Select Randomly( 0.25 ) << Exclude( 1 );
dt << Make Validation Column(
Stratification Columns( :Sex ),
Training Set( 0.75 ),
Validation Set( 0.25 ),
Test Set( 0 ),
New Column Name( "Strat Valid" ),
Validation Column Type( "Fixed" ),
Go
);
excludedRows = dt << Get Excluded Rows;
nonExcludedRows = dt << Select Excluded << Invert Row Selection << Get Selected Rows;
myGroups = Associative Array( dt[nonExcludedRows, "Sex"] ) << Get Keys;
trainVals = validationVals = testVals = [];
For( j = 1, j <= Length( myGroups ), j++,
validVals = dt[nonExcludedRows[Loc( dt[nonExcludedRows, "Sex"], myGroups[j] )], "Strat Valid"];
trainVals ||= N Row( Loc( validVals, 0 ) );
validationVals ||= N Row( Loc( validVals, 1 ) );
testVals ||= N Row( Loc( testVals, 2 ) );
);
Close( dt, nosave );
);
Random Reset( 123456789 );
Code Explanation:
- Loop 5 times.
- Open data table;
- Select 25% rows randomly.
- Exclude selected rows.
- Create validation column.
- Get excluded rows.
- Get non-excluded rows.
- Get unique sex groups.
- Initialize row count variables.
- Loop through each group.
- Count training, validation, test rows.
- Close data table without saving.
- Reset random seed.
Example 17
Summary: Generates a distribution analysis for continuous variables in a specified data table using the Distribution platform, with features including random sampling, row exclusion, and validation column creation.
Code:
For( sim = 1, sim <= 3, sim++,
dt = Open("data_table.jmp");
dt << Select Randomly( 0.8 ) << Exclude( 1 );
excludedRows = dt << Get Excluded Rows;
nonExcludedRows = dt << Select Excluded << Invert Row Selection << Get Selected Rows;
missingRows = nonExcludedRows[Random Index( N Row( nonExcludedRows ), 0.05 * N Row( nonExcludedRows ) )];
dt[missingRows, "DATE"] = .;
For( j = 1, j <= N Row( missingRows ), j++,
Remove From( nonExcludedRows, Loc( nonExcludedRows, missingRows[j] )[1] )
);
dt << Make Validation Column(
Cutpoint Column( :Week of Year ),
Training Set( 0.70 ),
Validation Set( 0.20 ),
Test Set( 0.10 ),
New Column Name( "Cutpoint Valid" ),
Validation Column Type( "Fixed" ),
Go
);
CutpointVals = Associative Array( dt[nonExcludedRows, "Week of Year"] ) << Get Keys;
trainingCut = Quantile( 0.7, CutpointVals );
validCut = Quantile( 0.9, CutpointVals );
TrainingRows = nonExcludedRows[Loc( dt[nonExcludedRows, "Cutpoint Valid"], 0 )];
TrainingRowsOracle = nonExcludedRows[Loc( dt[nonExcludedRows, "Week of Year"] < trainingCut )];
ValidationRows = nonExcludedRows[Loc( dt[nonExcludedRows, "Cutpoint Valid"], 1 )];
ValidationRowsOracle = nonExcludedRows[Loc(
dt[nonExcludedRows, "Week of Year"] < validCut & dt[nonExcludedRows, "Week of Year"] >= trainingCut
)];
TestRows = nonExcludedRows[Loc( dt[nonExcludedRows, "Cutpoint Valid"], 2 )];
TestRowsOracle = nonExcludedRows[Loc( dt[nonExcludedRows, "Week of Year"] >= validCut )];
Close( dt, nosave );
);
Random Reset( 123456789 );
Code Explanation:
- Loop 3 times.
- Open data table.
- Randomly select 80% rows, exclude.
- Get excluded rows.
- Get non-excluded rows.
- Randomly select 5% rows from non-excluded, mark as missing.
- Remove marked rows from non-excluded.
- Create validation column.
- Get unique week values from non-excluded.
- Calculate training, validation, test cutpoints.
- Identify training, validation, test rows.
- Close table without saving.
- Reset random seed.
Example 18
Summary: Generates a validation column using cutpoints for continuous variables in a specified data table, incorporating random row exclusion and missing value introduction.
Code:
For( sim = 1, sim <= 3, sim++,
dt = Open("data_table.jmp");
dt << Select Randomly( 0.8 ) << Exclude( 1 );
excludedRows = dt << Get Excluded Rows;
nonExcludedRows = dt << Select Excluded << Invert Row Selection << Get Selected Rows;
missingRows = nonExcludedRows[Random Index( N Row( nonExcludedRows ), 0.05 * N Row( nonExcludedRows ) )];
dt[missingRows, "DATE"] = .;
For( j = 1, j <= N Row( missingRows ), j++,
Remove From( nonExcludedRows, Loc( nonExcludedRows, missingRows[j] )[1] )
);
dt << Make Validation Column(
Cutpoint Column( :Week of Year ),
Training Set( 0.70 ),
Validation Set( 0.20 ),
Test Set( 0.10 ),
New Column Name( "Cutpoint Valid" ),
Validation Column Type( "Formula" ),
Go
);
CutpointVals = Associative Array( dt[nonExcludedRows, "Week of Year"] ) << Get Keys;
trainingCut = Quantile( 0.7, CutpointVals );
validCut = Quantile( 0.9, CutpointVals );
TrainingRows = nonExcludedRows[Loc( dt[nonExcludedRows, "Cutpoint Valid"], 0 )];
TrainingRowsOracle = nonExcludedRows[Loc( dt[nonExcludedRows, "Week of Year"] < trainingCut )];
ValidationRows = nonExcludedRows[Loc( dt[nonExcludedRows, "Cutpoint Valid"], 1 )];
ValidationRowsOracle = nonExcludedRows[Loc(
dt[nonExcludedRows, "Week of Year"] < validCut & dt[nonExcludedRows, "Week of Year"] >= trainingCut
)];
TestRows = nonExcludedRows[Loc( dt[nonExcludedRows, "Cutpoint Valid"], 2 )];
TestRowsOracle = nonExcludedRows[Loc( dt[nonExcludedRows, "Week of Year"] >= validCut )];
Close( dt, nosave );
);
Random Reset( 123456789 );
Code Explanation:
- Open data_table data
- Randomly exclude 20% of rows.
- Identify excluded rows.
- Select non-excluded rows.
- Introduce missing values in 5% of non-excluded rows.
- Remove affected rows from non-excluded list.
- Create validation column using cutpoints.
- Extract unique week values from non-excluded rows.
- Determine training and validation cutpoints.
- Assign rows to training, validation, and test sets.
Example 19
Summary: Process of generating distribution analysis for continuous variables in a specified data table using the Distribution platform, with features such as random row selection, exclusion, and validation column creation.
Code:
For( sim = 1, sim <= 5, sim++,
dt = Open("data_table.jmp");
dt << Select Randomly( 0.5 ) << Exclude( 1 );
excludedRows = dt << Get Excluded Rows;
nonExcludedRows = dt << Select Excluded << Invert Row Selection << Get Selected Rows;
missingRows = nonExcludedRows[Random Index( N Row( nonExcludedRows ), 0.20 * N Row( nonExcludedRows ) )];
dt[missingRows, "DATE"] = .;
For( j = 1, j <= N Row( missingRows ), j++,
Remove From( nonExcludedRows, Loc( nonExcludedRows, missingRows[j] )[1] )
);
dt << Make Validation Column(
Cutpoint Column( :Week of Year ),
Cutpoint Batch ID( :ID ),
Training Set( 0.75 ),
Validation Set( 0.15 ),
Test Set( 0.10 ),
New Column Name( "Cutpoint Valid " ),
Validation Column Type( "Fixed" ),
Go
);
dt << New Column( "Row", Numeric, "Continuous", Formula( Row() ) );
Column( dt, "Row" ) << Suppress Eval( 1 );
dt2 = dt << Subset( Output table name( "Non-Excluded Rows" ), Selected Rows( 1 ), All Columns( 1 ) );
dt2 << Delete Columns( {"Cutpoint Valid"} );
dt2 << Make Validation Column(
Cutpoint Column( :Week of Year ),
Cutpoint Batch ID( :ID ),
Training Set( 0.75 ),
Validation Set( 0.15 ),
Test Set( 0.10 ),
New Column Name( "Cutpoint Valid " ),
Validation Column Type( "Fixed" ),
Go
);
Close( dt, nosave );
Close( dt2, nosave );
);
Random Reset( 123456789 );
Code Explanation:
- Loop 5 times.
- Open data table.
- Select randomly 50% rows.
- Exclude selected rows.
- Get excluded rows.
- Invert row selection.
- Get non-excluded rows.
- Randomly select 20% non-excluded rows.
- Set DATE column to missing for selected rows.
- Remove missing rows from non-excluded rows list.
- Create validation column with fixed type.
- Add "Row" column.
- Suppress "Row" column evaluation.
- Subset non-excluded rows.
- Delete "Cutpoint Valid" column.
- Create validation column again.
- Close original table without saving.
- Close subset table without saving.
- Reset random seed.
Example 20
Summary: Generates a validation column for continuous variables in a specified data table, utilizing random sampling and exclusion techniques.
Code:
For( sim = 1, sim <= 5, sim++,
dt = Open("data_table.jmp");
dt << Select Randomly( 0.5 ) << Exclude( 1 );
excludedRows = dt << Get Excluded Rows;
nonExcludedRows = dt << Select Excluded << Invert Row Selection << Get Selected Rows;
missingRows = nonExcludedRows[Random Index( N Row( nonExcludedRows ), 0.20 * N Row( nonExcludedRows ) )];
dt[missingRows, "DATE"] = .;
For( j = 1, j <= N Row( missingRows ), j++,
Remove From( nonExcludedRows, Loc( nonExcludedRows, missingRows[j] )[1] )
);
dt << Make Validation Column(
Cutpoint Column( :Week of Year ),
Cutpoint Batch ID( :ID ),
Training Set( 0.75 ),
Validation Set( 0.15 ),
Test Set( 0.10 ),
New Column Name( "Cutpoint Valid " ),
Validation Column Type( "Formula" ),
Go
);
dt << New Column( "Row", Numeric, "Continuous", Formula( Row() ) );
Column( dt, "Row" ) << Suppress Eval( 1 );
dt2 = dt << Subset( Output table name( "Non-Excluded Rows" ), Selected Rows( 1 ), All Columns( 1 ) );
dt2 << Delete Columns( {"Cutpoint Valid"} );
dt2 << Make Validation Column(
Cutpoint Column( :Week of Year ),
Cutpoint Batch ID( :ID ),
Training Set( 0.75 ),
Validation Set( 0.15 ),
Test Set( 0.10 ),
New Column Name( "Cutpoint Valid " ),
Validation Column Type( "Formula" ),
Go
);
Close( dt, nosave );
Close( dt2, nosave );
);
Random Reset( 123456789 );
Code Explanation:
- Loop 5 times.
- Open data table.
- Randomly select 50% rows.
- Exclude selected rows.
- Get excluded rows.
- Get non-excluded rows.
- Randomly select 20% non-excluded rows.
- Set DATE to missing for selected rows.
- Remove missing rows from non-excluded list.
- Create validation column.
- Add Row column.
- Suppress Row column evaluation.
- Subset non-excluded rows.
- Delete Cutpoint Valid column.
- Create validation column in subset.
- Close original table.
- Close subset table.
- Reset random seed.
Example 21
Summary: Process of generating a random validation column and calculating proportions for training, validation, and test sets in a specified data table.
Code:
For( sim = 1, sim <= 5, sim++,
dt = Open("data_table.jmp");
dt << Select Randomly( 0.45 ) << Exclude( 1 );
excludedRows = dt << Get Excluded Rows;
nonExcludedRows = dt << Select Excluded << Invert Row Selection << Get Selected Rows;
dt << Make Validation Column(
Training Set( 0.6 ),
Validation Set( 0.2 ),
Test Set( 0.2 ),
New Column Name( "Random Valid " ),
Validation Column Type( "Fixed" ),
Go
);
n = N Row( nonExcludedRows );
propTraining = N Row( Loc( dt[nonExcludedRows, "Random Valid"], 0 ) ) / n;
propValid = N Row( Loc( dt[nonExcludedRows, "Random Valid"], 1 ) ) / n;
propTest = N Row( Loc( dt[nonExcludedRows, "Random Valid"], 2 ) ) / n;
Close( dt, nosave );
);
Random Reset( 123456789 );
Code Explanation:
- Loop through simulations.
- Open data table.
- Select rows randomly.
- Exclude selected rows.
- Get excluded rows.
- Get non-excluded rows.
- Create validation column.
- Count non-excluded rows.
- Calculate training set proportion.
- Calculate validation set proportion.
- Calculate test set proportion.
- Close data table without saving.
- Reset random seed.
Example 22
Summary: Process of generating a random validation column in a data table, splitting rows into training, validation, and test sets.
Code:
For( sim = 1, sim <= 5, sim++,
dt = Open("data_table.jmp");
dt << Select Randomly( 0.6 ) << Exclude( 1 );
excludedRows = dt << Get Excluded Rows;
nonExcludedRows = dt << Select Excluded << Invert Row Selection << Get Selected Rows;
dt << Make Validation Column(
Training Set( 0.7 ),
Validation Set( 0.2 ),
Test Set( 0.1 ),
New Column Name( "Random Valid " ),
Validation Column Type( "Formula" ),
Go
);
n = N Row( nonExcludedRows );
propTraining = N Row( Loc( dt[nonExcludedRows, "Random Valid"], 0 ) ) / n;
propValid = N Row( Loc( dt[nonExcludedRows, "Random Valid"], 1 ) ) / n;
propTest = N Row( Loc( dt[nonExcludedRows, "Random Valid"], 2 ) ) / n;
Close( dt, nosave );
);
Code Explanation:
- Loop through simulations.
- Open data table.
- Select rows randomly.
- Exclude selected rows.
- Get excluded row indices.
- Get non-excluded row indices.
- Create validation column.
- Calculate number of non-excluded rows.
- Calculate training set proportion.
- Calculate validation set proportion.
- Calculate test set proportion.
- Close table without saving.
Make Validation Column using Select Randomly
Example 1
Summary: Process of creating fixed and formula validation columns in a JMP data table, utilizing random sampling and row exclusion techniques.
Code:
dt = Open("data_table.jmp");
dt << Select Randomly( 0.5 ) << Exclude( 1 );
excludedRows = dt << Get Excluded Rows;
nonExcludedRows = dt << Select Excluded << Invert Row Selection << Get Selected Rows;
missingRows = nonExcludedRows[Random Index( N Row( nonExcludedRows ), 0.20 * N Row( nonExcludedRows ) )];
dt[missingRows, "DATE"] = .;
For( j = 1, j <= N Row( missingRows ), j++,
Remove From( nonExcludedRows, Loc( nonExcludedRows, missingRows[j] )[1] )
);
randTraining = Round( Random Uniform( 0.2, 0.9 ), 2 );
randValidation = Round( Random Uniform( 0, 1 - randTraining ), 2 );
randTest = 1 - randTraining - randValidation;
dt << Make Validation Column(
Cutpoint Column( :Week of Year ),
Cutpoint Batch ID( :ID ),
Training Set( Eval( randTraining ) ),
Validation Set( Eval( randValidation ) ),
Test Set( Eval( randTest ) ),
New Column Name( "Fixed Validation " ),
Validation Column Type( "Fixed" ),
Go
);
dt << Make Validation Column(
Cutpoint Column( :Week of Year ),
Cutpoint Batch ID( :ID ),
Training Set( Eval( randTraining ) ),
Validation Set( Eval( randValidation ) ),
Test Set( Eval( randTest ) ),
New Column Name( "Formula Validation" ),
Validation Column Type( "Formula" ),
Go
);
Code Explanation:
- Open data table.
- Randomly select half rows.
- Exclude selected rows.
- Get excluded rows.
- Invert row selection.
- Get non-excluded rows.
- Randomly select 20% rows.
- Set DATE to missing for selected rows.
- Remove missing rows from non-excluded.
- Create fixed validation column.
- Create formula validation column.
Example 2
Summary: Process of selecting and summarizing data, introducing missing values, and creating validation columns in JMP.
Code:
dt = Open("data_table.jmp");
dt << Select Randomly( Round( Random Uniform( 0, 0.75 ), 2 ) ) << Exclude( 1 );
excludedRows = dt << Get Excluded Rows;
nonExcludedRows = dt << Select Excluded << Invert Row Selection << Get Selected Rows;
missingRows = nonExcludedRows[Random Index( N Row( nonExcludedRows ), 0.20 * N Row( nonExcludedRows ) )];
dt[missingRows, "DATE"] = .;
For( j = 1, j <= N Row( missingRows ), j++,
Remove From( nonExcludedRows, Loc( nonExcludedRows, missingRows[j] )[1] )
);
dt2 = dt << Subset( Selected Rows( 1 ), All Columns( 1 ), Invisible( 1 ) );
dtSub = dt2 << Summary( Group( :ID ), N Missing( :Week of Year ), Freq( "None" ), Weight( "None" ), Invisible( 1 ) );
dtSub << New Column( "Batch Size", Numeric, "Continuous", Formula( :N Rows - :"N Missing(Week of Year)"n ) );
nRowsBatch = Min( dtSub[0, "Batch Size"] );
randTraining = Random Integer( 1, nRowsBatch );
If( randTraining < nRowsBatch,
randValidation = Random Integer( 1, nRowsBatch - randTraining ),
randValidation = 0
);
randTest = nRowsBatch - randTraining - randValidation;
dt << Make Validation Column(
Cutpoint Column( :Week of Year ),
Cutpoint Batch ID( :ID ),
Training Set( Eval( randTraining ) ),
Validation Set( Eval( randValidation ) ),
Test Set( Eval( randTest ) ),
New Column Name( "Fixed Validation " ),
Validation Column Type( "Fixed" ),
Determine Cutpoints Using( "Numbers of Rows" ),
Go
);
dt << Make Validation Column(
Cutpoint Column( :Week of Year ),
Cutpoint Batch ID( :ID ),
Training Set( Eval( randTraining ) ),
Validation Set( Eval( randValidation ) ),
Test Set( Eval( randTest ) ),
New Column Name( "Formula Validation" ),
Validation Column Type( "Formula" ),
Determine Cutpoints Using( "Numbers of Rows" ),
Go
);
Close( dt, nosave );
Code Explanation:
- Open data table.
- Randomly select rows.
- Exclude selected rows.
- Get excluded rows.
- Select non-excluded rows.
- Introduce missing values.
- Update row selection.
- Create subset table.
- Summarize data by ID.
- Add batch size column.
- Determine batch sizes.
- Assign random training, validation, test sets.
- Create fixed validation column.
- Create formula validation column.
- Close table without saving.
Example 3
Summary: Creates a data table with new columns for 'Min Week', 'Max Week', and 'Elapsed Time' by selecting random rows, excluding selected rows, and calculating elapsed time.
Code:
dt = Open("data_table.jmp");
dt << Select Randomly( Round( Random Uniform( 0, 0.75 ), 2 ) ) << Exclude( 1 );
dt2 = dt << Clear Select << Select Excluded << Invert Row Selection << Subset( Selected Rows( 1 ), All Columns( 1 ), Invisible( 1 ) );
dt2 << New Column( "Min Week", Numeric, "Continuous", Formula( Col Min( :Week of Year, :ID ) ) );
dt2 << New Column( "Max Week", Numeric, "Continuous", Formula( Col Max( :Week of Year, :ID ) ) );
dt2 << New Column( "Elapsed Time", Numeric, "Continuous", Formula( :Max Week - :Min Week ) );
minElapsed = Min( dt2[0, "Elapsed Time"] );
randTraining = Random Integer( 0, minElapsed );
randValidation = Random Integer( 0, minElapsed - randTraining );
randTest = minElapsed - randTraining - randValidation;
dt << Make Validation Column(
Cutpoint Column( :Week of Year ),
Cutpoint Batch ID( :ID ),
Training Set( Eval( randTraining ) ),
Validation Set( Eval( randValidation ) ),
Test Set( Eval( randTest ) ),
New Column Name( "Fixed Validation " ),
Validation Column Type( "Fixed" ),
Determine Cutpoints Using( "Elapsed Time" ),
Go
);
dt << Make Validation Column(
Cutpoint Column( :Week of Year ),
Cutpoint Batch ID( :ID ),
Training Set( Eval( randTraining ) ),
Validation Set( Eval( randValidation ) ),
Test Set( Eval( randTest ) ),
New Column Name( "Formula Validation" ),
Validation Column Type( "Formula" ),
Determine Cutpoints Using( "Elapsed Time" ),
Go
);
Code Explanation:
- Open data table.
- Randomly select rows.
- Exclude selected rows.
- Create new table with excluded rows.
- Add "Min Week" column.
- Add "Max Week" column.
- Add "Elapsed Time" column.
- Calculate minimum elapsed time.
- Generate random training size.
- Generate random validation size.
- Generate random test size.
- Create fixed validation column.
- Create formula validation column.
Example 4
Summary: Process of selecting random rows, excluding and removing missing values, creating subsets, summarizing data by ID, and generating validation columns in JMP.
Code:
dt = Open("data_table.jmp");
dt << Select Randomly( Round( Random Uniform( 0, 0.75 ), 2 ) ) << Exclude( 1 );
excludedRows = dt << Get Excluded Rows;
nonExcludedRows = dt << Select Excluded << Invert Row Selection << Get Selected Rows;
missingRows = nonExcludedRows[Random Index( N Row( nonExcludedRows ), 0.20 * N Row( nonExcludedRows ) )];
dt[missingRows, "DATE"] = .;
For( j = 1, j <= N Row( missingRows ), j++,
Remove From( nonExcludedRows, Loc( nonExcludedRows, missingRows[j] )[1] )
);
dt2 = dt << Subset( Selected Rows( 1 ), All Columns( 1 ), Invisible( 1 ) );
dtSub = dt2 << Summary( Group( :ID ), N Missing( :Week of Year ), Freq( "None" ), Weight( "None" ), Invisible( 1 ) );
dtSub << New Column( "Batch Size", Numeric, "Continuous", Formula( :N Rows - :"N Missing(Week of Year)"n ) );
nRowsBatch = Min( dtSub[0, "Batch Size"] );
randTraining = Random Integer( 1, nRowsBatch );
If( randTraining < nRowsBatch,
randValidation = Random Integer( 1, nRowsBatch - randTraining ),
randValidation = 0
);
randTest = nRowsBatch - randTraining - randValidation;
dt << Make Validation Column(
Cutpoint Column( :Week of Year ),
Cutpoint Batch ID( :ID ),
Training Set( Eval( randTraining ) ),
Validation Set( Eval( randValidation ) ),
Test Set( Eval( randTest ) ),
New Column Name( "Fixed Validation " ),
Validation Column Type( "Fixed" ),
Determine Cutpoints Using( "Numbers of Rows" ),
Go
);
dt << Make Validation Column(
Cutpoint Column( :Week of Year ),
Cutpoint Batch ID( :ID ),
Training Set( Eval( randTraining ) ),
Validation Set( Eval( randValidation ) ),
Test Set( Eval( randTest ) ),
New Column Name( "Formula Validation" ),
Validation Column Type( "Formula" ),
Determine Cutpoints Using( "Numbers of Rows" ),
Go
);
Code Explanation:
- Open data table.
- Select rows randomly.
- Exclude selected rows.
- Get excluded rows.
- Invert row selection.
- Select non-excluded rows.
- Randomly select missing rows.
- Set DATE to missing for selected rows.
- Remove missing rows from non-excluded.
- Create subset of data.
- Summarize data by ID.
- Add batch size column.
- Calculate minimum batch size.
- Generate random training size.
- Generate random validation size.
- Calculate test size.
- Create fixed validation column.
- Create formula validation column.
Make Validation Column using Random Integer
Example 1
Summary: Creates a validation column in JMP, using stratification and grouping columns to partition data for model evaluation.
Code:
dt = Open("data_table.jmp");
nFolds = Random Integer( 4, 16 );
dt << Make Validation Column(
Y( :TAVG ),
Stratification Columns( :Latitude ),
Grouping Columns( :NAME ),
Number of Folds( nFolds ),
Validation Column Type( "Fixed" ),
Random Seed( 123 ),
Go
);
Code Explanation:
- Open data table;
- Generate random number for folds.
- Create validation column.
- Set response variable.
- Define stratification columns.
- Define grouping columns.
- Specify number of folds.
- Set validation type to fixed.
- Set random seed.
- Execute validation creation.
Example 2
Summary: Creates a validation column in JMP, using random stratification and fixed validation type.
Code:
dt = Open("data_table.jmp");
nFolds = Random Integer( 4, 16 );
dt << Make Validation Column(
Y( :Steel Shipments ),
Stratification Columns( :Date ),
Number of Folds( nFolds ),
Validation Column Type( "Fixed" ),
Random Seed( 456 ),
Go
);
Code Explanation:
- Open data table.
- Generate random integer.
- Define validation column.
- Set response variable.
- Specify stratification columns.
- Set number of folds.
- Choose fixed validation type.
- Set random seed.
- Execute validation creation.
Make Validation Column using Associative Array
Example 1
Summary: Creates and manipulates a validation column in JMP, using cutpoints based on elapsed time and batch ID, while selecting specific series rows and deleting unnecessary data.
Code:
dt = Open("data_table.jmp");
allSeries = Associative Array( dt[0, 1] ) << Get Keys;
obj = Make Validation Column(
Cutpoint Column( :Time ),
Cutpoint Batch ID( :Series ),
Training Set( 268185600 ),
Validation Set( 0 ),
Test Set( 7948800 ),
Determine cutpoints using( "Elapsed Time" ),
Go
);
dt << Select Where( :Series == "N 646" | :Series == "N 647" ) << Invert Row Selection << Delete Rows();
obj = Make Validation Column(
Cutpoint Column( :Time ),
Cutpoint Batch ID( :Series ),
Training Set( 331257600 ),
Validation Set( 0 ),
Test Set( 7948800 ),
Determine cutpoints using( "Elapsed Time" ),
Go
);
Close( dt, nosave );
Random Reset( 123 );
Code Explanation:
- Open data_table data
- Get all series keys.
- Create validation column.
- Set cutpoint column to Time.
- Set cutpoint batch ID to Series.
- Define training set start.
- Define validation set size.
- Define test set size.
- Use elapsed time for cutpoints.
- Execute validation column creation.
- Select specific series rows.
- Invert row selection.
- Delete selected rows.
- Create new validation column.
- Set new training set start.
- Close data table without saving.
- Reset random seed.
Example 2
Summary: Creates and configures validation columns in JMP, utilizing cutpoints based on elapsed time.
Code:
dt = Open("data_table.jmp");
allSeries = Associative Array( dt[0, 1] ) << Get Keys;
obj = Make Validation Column(
Cutpoint Column( :Time ),
Cutpoint Batch ID( :Series ),
Training Set( 268185600 ),
Validation Set( 0 ),
Test Set( 7948800 ),
Determine cutpoints using( "Elapsed Time" ),
Go
);
dt << Select Where( :Series == "N 646" | :Series == "N 647" ) << Invert Row Selection << Delete Rows();
obj = Make Validation Column(
Cutpoint Column( :Time ),
Cutpoint Batch ID( :Series ),
Training Set( 331257600 ),
Validation Set( 0 ),
Test Set( 7948800 ),
Determine cutpoints using( "Elapsed Time" ),
Go
);
Code Explanation:
- Open data table;
- Retrieve all series keys.
- Create validation column.
- Define cutpoint column.
- Define cutpoint batch ID.
- Set training period.
- Set validation period.
- Set test period.
- Use elapsed time for cutpoints.
- Execute validation creation.
- Select specific rows.
- Invert row selection.
- Delete selected rows.
- Create another validation column.
- Define new cutpoint column.
- Define new cutpoint batch ID.
- Set new training period.
- Set new validation period.
- Set new test period.
- Use elapsed time for new cutpoints.
- Execute new validation creation.
Example 3
Summary: Creates a validation column in JMP, grouping data by age and excluding random rows for training, validation, and testing sets.
Code:
dt = Open("data_table.jmp");
myGroups = Associative Array( dt[0, "age"] ) << Get Keys;
For( i = 1, i <= 5, i++,
toExclude = Random Index( Length( myGroups ), Random Integer( 0, Length( myGroups ) ) );
excludedRows = [];
For( j = 1, j <= N Row( toExclude ), j++,
excludedRows |/= (dt << Select Where( :age == myGroups[toExclude[j]] ) << Get Selected Rows)
);
dt << Select Rows( excludedRows ) << Exclude( 1 );
obj = dt << Make Validation Column(
Grouping Columns( :age ),
Training Set( 0.7 ),
Validation Set( 0.2 ),
Test Set( 0.1 ),
New Column Name( "Grouped Valid" ),
Validation Column Type( "Formula" )
);
obj << close window;
dt << Clear Row States;
);
Code Explanation:
- Open data table.
- Retrieve unique ages.
- Loop 5 times.
- Randomly select age groups to exclude.
- Initialize empty list for excluded rows.
- Loop through selected age groups.
- Find rows matching selected age group.
- Add selected rows to excluded list.
- Exclude selected rows from data table.
- Create validation column with specified sets.
- Close validation column window.
- Clear row states in data table.
Make Validation Column using Round
Summary: Creates a validation column in a JMP data table, stratified by 'Fat' and grouped by 'Manufacturer', with random training and validation sets.
Code:
dt = Open("data_table.jmp");
ts = Round( Random Uniform( 0.5, 0.75 ), 2 );
vs = 1 - ts;
seed = Random Integer( 123456789 );
dt << Make Validation Column(
Stratification Columns( :Fat ),
Grouping Columns( :Manufacturer ),
Training Set( ts ),
Validation Set( vs ),
Random Seed( seed )
);
Code Explanation:
- Open data table;
- Generate random training proportion.
- Calculate validation proportion.
- Set random seed.
- Create validation column.
- Stratify by Fat.
- Group by Manufacturer.
- Define training set size.
- Define validation set size.
- Apply random seed.
Make Validation Column using N Row
Summary: Creates and processes validation columns for a data table, utilizing random seed generation and grouping by age.
Code:
dt = Open("data_table.jmp");
n = N Row( dt );
groupVals = Associative Array( dt[0, "age"] ) << Get Keys;
nGroups = Length( groupVals );
For( i = 4, i <= nGroups, i++,
randSeed = Random Integer( 11111, 123456789 );
Random Reset( randSeed );
obj = dt << Make Validation Column(
Y( :weight ),
Grouping Columns( :age ),
Number of Folds( Eval( i ) ),
Validation Column Type( "Formula" )
);
obj << Go;
myFolds = Associative Array( dt[0, Char( i ) || " Fold Column"] ) << Get Keys;
colFormula = Collapse Whitespace( Char( Column( dt, Char( i ) || " Fold Column" ) << Get Formula ) );
For( j = 1, j <= nGroups, j++,
foldVals = dt[Loc( dt[0, "age"], groupVals[j] ), Char( i ) || " Fold Column"]
);
);
Code Explanation:
- Open data table;
- Count rows in dataset.
- Extract unique age values.
- Determine number of groups.
- Loop through group count starting from 4.
- Generate random seed.
- Reset random seed.
- Create validation column.
- Set formula for validation column.
- Extract and process fold column data.
Make Validation Column using Select Rows
Summary: Creates fixed validation columns for weight, stratified by height and grouped by age in a JMP data table.
Code:
dt = Open("data_table.jmp");
dt << Select Rows( 1 :: 40 ) << Exclude( 1 );
dt << Make Validation Column( Y( :weight ), Number of Folds( 4 ), Validation Column Type( "Fixed" ), Random Seed( 12345 ), Go );
dt << Make Validation Column(
Y( :weight ),
Stratification Columns( :height ),
Number of Folds( 4 ),
Validation Column Type( "Fixed" ),
Random Seed( 12345 ),
Go
);
Log Capture(
obj = dt << Make Validation Column(
Y( :weight ),
Grouping Columns( :age ),
Number of Folds( 4 ),
Validation Column Type( "Fixed" ),
Random Seed( 12345 ),
Go
)
);
Log Capture(
obj = dt << Make Validation Column(
Y( :weight ),
Stratification Columns( :height ),
Grouping Columns( :age ),
Number of Folds( 4 ),
Validation Column Type( "Fixed" ),
Random Seed( 12345 ),
Go
)
);
Code Explanation:
- Open data table.
- Select rows 1 to 40.
- Exclude selected rows.
- Create fixed validation column for weight.
- Set number of folds to 4.
- Use random seed 12345.
- Create another fixed validation column for weight.
- Stratify by height.
- Create third fixed validation column for weight.
- Group by age.
- Stratify by height.
- Group by age.
Make Validation Column using Random Reset
Example 1
Summary: Creates a validation column in JMP, utilizing random sampling and formula-based validation with 4 folds.
Code:
dt = Open("data_table.jmp");
Random Reset( 123 );
dt[Random Index( 40, 10 ), "weight"] = .;
obj = dt << Make Validation Column( Y( :weight ), Number of Folds( 4 ), Validation Column Type( "Formula" ), Go );
Code Explanation:
- Open data table.
- Reset random seed.
- Randomly select rows.
- Set selected weights to missing.
- Create validation column.
- Specify weight as response.
- Set number of folds to 4.
- Use formula for validation.
- Execute validation creation.
Example 2
Summary: Creates a validation column in JMP, using random sampling and stratification to validate weight data based on height.
Code:
dt = Open("data_table.jmp");
Random Reset( 123 );
dt[Random Index( 40, 10 ), "height"] = .;
obj = dt << Make Validation Column( Y( :weight ), Stratification Columns( :height ), Validation Column Type( "Formula" ), Go );
Code Explanation:
- Open data table.
- Set random seed.
- Replace 40 height values randomly.
- Create validation column.
- Specify weight as outcome.
- Use height for stratification.
- Set validation type to formula.
- Execute validation column creation.
Example 3
Summary: Creates a validation column in JMP, utilizing random sampling and grouping by age to validate weight data.
Code:
dt = Open("data_table.jmp");
Random Reset( 123 );
dt[Random Index( 40, 10 ), "age"] = .;
obj = dt << Make Validation Column(
Y( :weight ),
Grouping Columns( :age ),
Validation Column Type( "Fixed" ),
Random Seed( 123456789 ),
Go
);
Code Explanation:
- Open data table;
- Set random seed for reproducibility.
- Remove 10 random age values.
- Create validation column.
- Set response variable to weight.
- Use age for grouping.
- Specify fixed validation type.
- Set random seed for validation.
- Execute validation creation.
Example 4
Summary: Creates a validation column in JMP, utilizing random sampling and grouping by age and sex to validate weight data.
Code:
dt = Open("data_table.jmp");
Random Reset( 123 );
dt[Random Index( 40, 10 ), "age"] = .;
dt[Random Index( 40, 10 ), "sex"] = "";
obj = dt << Make Validation Column(
Y( :weight ),
Grouping Columns( :age, :sex ),
Validation Column Type( "Fixed" ),
Random Seed( 123456789 ),
Go
);
expectedMissing = Matrix( Associative Array( Loc( dt[0, "sex"], "" ) |/ Loc( Is Missing( dt[0, "age"] ) ) ) << Get Keys );
Code Explanation:
- Open data table.
- Set random seed.
- Randomly remove age values.
- Randomly remove sex values.
- Create validation column.
- Specify weight as outcome.
- Use age and sex for grouping.
- Set validation type to fixed.
- Set random seed for validation.
- Execute validation creation.
Example 5
Summary: Creates a validation column for weight data, stratified by height and grouped by age and sex, with random missing values introduced in height, age, and sex.
Code:
dt = Open("data_table.jmp");
Random Reset( 123 );
dt[Random Index( 40, 10 ), "height"] = .;
dt[Random Index( 40, 10 ), "age"] = .;
dt[Random Index( 40, 10 ), "sex"] = "";
obj = dt << Make Validation Column(
Y( :weight ),
Stratification Columns( :height ),
Grouping Columns( :age, :sex ),
Validation Column Type( "Fixed" ),
Random Seed( 123456789 ),
Go
);
expectedMissing = Matrix(
Associative Array( Loc( dt[0, "sex"], "" ) |/ Loc( Is Missing( dt[0, "age"] ) ) |/ Loc( Is Missing( dt[0, "height"] ) ) ) << Get Keys
);
Code Explanation:
- Open data table.
- Set random seed for reproducibility.
- Introduce missing values randomly in height.
- Introduce missing values randomly in age.
- Introduce empty strings randomly in sex.
- Create validation column for weight.
- Stratify by height.
- Group by age and sex.
- Use fixed validation type.
- Set random seed for validation.
Example 6
Summary: Prepares data by opening a JMP data table, randomly removing values, creating a validation column, and identifying missing locations.
Code:
dt = Open("data_table.jmp");
Random Reset( 123 );
dt[Random Index( 40, 5 ), "height"] = .;
dt[Random Index( 40, 10 ), "weight"] = .;
obj = dt << Make Validation Column( Y( :weight ), Number of Folds( 4 ), Validation Column Type( "Formula" ), Go );
missingLoc = Loc( Is Missing( dt[0, "weight"] ) );
nonMissingLoc = Loc( !Is Missing( dt[0, "weight"] ) );
Close( dt, nosave );
Random Reset( 123 );
Code Explanation:
- Open data table;
- Set random seed to 123.
- Randomly remove 40% of heights.
- Randomly remove 10% of weights.
- Create validation column for weight.
- Identify missing weight locations.
- Identify non-missing weight locations.
- Close dataset without saving.
- Reset random seed to 123.
Example 7
Summary: Creates a validation column in JMP, utilizing random sampling and stratification to validate model performance.
Code:
dt = Open("data_table.jmp");
Random Reset( 123 );
dt[Random Index( 40, 10 ), "height"] = .;
dt[Random Index( 40, 10 ), "age"] = .;
obj = dt << Make Validation Column(
Y( :weight ),
Stratification Columns( :height ),
Grouping Columns( :age ),
Number of Folds( 4 ),
Validation Column Type( "Fixed" ),
Random Seed( 123456789 ),
Go
);
missingLoc = dt << Clear Select << Select Where( Is Missing( :height ) | Is Missing( :age ) ) << Get Selected Rows;
nonMissingLoc = dt << Invert Row Selection << Get Selected Rows;
Code Explanation:
- Open data table.
- Reset random seed.
- Set random height values to missing.
- Set random age values to missing.
- Create validation column.
- Specify weight as response variable.
- Use height for stratification.
- Use age for grouping.
- Define 4 folds.
- Set validation type to fixed.
- Set random seed for validation.
- Execute validation creation.
- Clear previous selections.
- Select rows with missing height or age.
- Retrieve selected rows with missing values.
- Invert row selection.
- Retrieve non-missing rows.
Example 8
Summary: Creates a validation column with stratification and random sampling, utilizing Make Validation Column in JMP.
Code:
dt = Open("data_table.jmp");
Random Reset( 123 );
dt[Random Index( 40, 10 ), "height"] = .;
dt[Random Index( 40, 10 ), "age"] = .;
obj = dt << Make Validation Column(
Y( :weight ),
Stratification Columns( :height, :age ),
Number of Folds( 4 ),
Validation Column Type( "Fixed" ),
Random Seed( 123456789 ),
Go
);
Code Explanation:
- Open data table;
- Set random seed.
- Randomly select 40 rows for height.
- Set selected height values to missing.
- Randomly select 40 rows for age.
- Set selected age values to missing.
- Create validation column.
- Specify weight as response variable.
- Use height and age for stratification.
- Set number of folds to 4.
Example 9
Summary: Creates a validation column in JMP, utilizing stratification columns and random seed for consistency.
Code:
dt = Open("data_table.jmp");
Random Reset( 123 );
dt[Random Index( 40, 20 ), "height"] = .;
dt[Random Index( 40, 20 ), "age"] = .;
obj = dt << Make Validation Column(
Y( :weight ),
Stratification Columns( :height, :age ),
Number of Folds( 4 ),
Validation Column Type( "Fixed" ),
Random Seed( 123456789 ),
Go
);
Code Explanation:
- Open data table.
- Reset random seed.
- Delete random height values.
- Delete random age values.
- Create validation column.
- Set response variable to weight.
- Use height and age for stratification.
- Define number of folds as 4.
- Set validation type to fixed.
- Apply random seed for consistency.
Example 10
Summary: Creates a validation column in JMP, utilizing random sampling and stratification for data analysis.
Code:
dt = Open("data_table.jmp");
Random Reset( 123 );
dt[Random Index( 40, 20 ), "height"] = .;
dt[Random Index( 40, 20 ), "weight"] = .;
dt[Random Index( 40, 20 ), "age"] = .;
lc = Collapse Whitespace(
Log Capture(
obj = dt << Make Validation Column(
Y( :weight ),
Stratification Columns( :height, :weight ),
Grouping Columns( :age ),
Number of Folds( 6 ),
Validation Column Type( "Fixed" ),
Random Seed( 123456789 ),
Go
)
)
);
Code Explanation:
- Open data table;
- Set random seed to 123.
- Randomly select 40 rows for height.
- Randomly select 40 rows for weight.
- Randomly select 40 rows for age.
- Remove selected rows' data.
- Collapse whitespace.
- Log capture.
- Create validation column.
- Specify weight as response.
- Use height and weight for stratification.
- Use age for grouping.
- Set number of folds to 6.
- Set validation type to fixed.
- Set random seed to 123456789.
- Execute validation column creation.
Example 11
Summary: Creates a validation column for weight data, utilizing random sampling and cross-validation with 4 folds.
Code:
dt = Open("data_table.jmp");
Random Reset( 123 );
dt[Random Index( 40, 5 ), "height"] = .;
dt[Random Index( 40, 10 ), "weight"] = .;
obj = dt << Make Validation Column( Y( :weight ), Number of Folds( 4 ), Validation Column Type( "Formula" ), Go );
missingLoc = Loc( Is Missing( dt[0, "weight"] ) );
nonMissingLoc = Loc( !Is Missing( dt[0, "weight"] ) );
Code Explanation:
- Open data table;
- Set random seed to 123.
- Randomly remove 40 height values.
- Randomly remove 40 weight values.
- Create validation column for weight.
- Use 4 folds for cross-validation.
- Use formula for validation column type.
- Execute the validation column creation.
- Locate missing weight values.
- Locate non-missing weight values.
Make Validation Column using Random Index
Example 1
Summary: Creates a validation column and identification of missing values in a data table, utilizing Random Index to introduce random missingness.
Code:
dt = Open("data_table.jmp");
dt[Random Index( 40, 20 ), "height"] = .;
dt[Random Index( 40, 20 ), "weight"] = .;
obj = dt << Make Validation Column( Y( :weight, :height ), Number of Folds( 5 ), Validation Column Type( "Fixed" ), Go );
missingLoc = dt << Clear Select << Select Where( Is Missing( :height ) & Is Missing( :weight ) ) << Get Selected Rows;
nonMissingLoc = dt << Invert Row Selection << Get Selected Rows;
Code Explanation:
- Open data table.
- Introduce missing values randomly.
- Create validation column.
- Identify rows with missing values.
- Identify rows without missing values.
Example 2
Summary: Process of setting missing values, creating a validation column, and selecting non-missing rows in a JMP table.
Code:
dt = Open("data_table.jmp");
dt[Random Index( N Row( dt ), 10 ), {"OZONE", "CO", "SO2", "NO", "PM10"}] = .;
obj = dt << Make Validation Column( Y( :OZONE, :CO, :SO2, :NO, :PM10 ), Number of Folds( 6 ), Go );
missingLoc = dt << Clear Select << Select Where(
Is Missing( :OZONE ) & Is Missing( :CO ) & Is Missing( :SO2 ) & Is Missing( :NO ) & Is Missing( :PM10 )
) << Get Selected Rows;
nonMissingLoc = dt << Invert Row Selection << Get Selected Rows;
Code Explanation:
- Open table.
- Set missing values.
- Create validation column.
- Clear selection.
- Select missing rows.
- Get selected rows.
- Invert row selection.
- Get selected rows.
Example 3
Summary: Modifies a data table by randomly setting 5% of values in columns 2 to 39 to missing, and then creates a validation column with stratification and response variable.
Code:
dt = Open("data_table.jmp");
x = dt[0, 2 :: 39];
x[Random Index( 527 * 38, .05 * 527 * 38 )] = .;
dt[0, 2 :: 39] = x;
dt << Make Validation Column(
Y( :Date ),
Stratification Columns(
:"Q-E"n, :"ZN-E"n, :"PH-E"n, :"DBO-E"n, :"DQO-E"n, :"SS-E"n, :"SSV-E"n, :"SED-E"n, :"COND-E"n, :"PH-P"n, :"DBO-P"n, :"SS-P"n,
:"SSV-P"n, :"SED-P"n, :"COND-P"n, :"PH-D"n, :"DBO-D"n, :"DQO-D"n, :"SS-D"n, :"SSV-D"n, :"SED-D"n, :"COND-D"n, :"PH-S"n, :"DBO-S"n,
:"DQO-S"n, :"SS-S"n, :"SSV-S"n, :"SED-S"n, :"COND-S"n, :"RD-DBO-P"n, :"RD-SS-P"n, :"RD-SED-P"n, :"RD-DBO-S"n, :"RD-DQO-S"n,
:"RD-DBO-G"n, :"RD-DQO-G"n, :"RD-SS-G"n, :"RD-SED-G"n
),
Number of Folds( 4 ),
Go
);
Code Explanation:
- Open data table;
- Assign columns 2 to 39 to variable
x. - Randomly set 5% of
xvalues to missing. - Replace columns 2 to 39 in the data table with modified
x. - Create validation column.
- Set response variable as
:Date. - Specify stratification columns.
- Define number of folds as 4.
- Execute validation column creation.