Bootstrap Forest
Example 1
Summary: Opens a data table, sets the response variable, defines predictor variables, specifies validation method, chooses Bootstrap Forest method, and executes analysis with 100 trees and 3 terms.
Code:
// Bootstrap Forest
// Open data table
dt = Open("data_table.jmp");
// Bootstrap Forest
Bootstrap Forest(
Y( :Percent body fat ),
X(
:"Age (years)"n, :"Weight (lbs)"n,
:"Height (inches)"n,
:"Neck circumference (cm)"n,
:"Chest circumference (cm)"n,
:"Abdomen circumference (cm)"n,
:"Hip circumference (cm)"n,
:"Thigh circumference (cm)"n,
:"Knee circumference (cm)"n,
:"Ankle circumference (cm)"n,
:
"Biceps (extended) circumference (cm)"n,
:"Forearm circumference (cm)"n,
:"Wrist circumference (cm)"n
),
Validation( :Validation ),
Method( "Bootstrap Forest" ),
Portion Bootstrap( 1 ),
Number Terms( 3 ),
Number Trees( 100 ),
Go
);
Code Explanation:
- Open data table.
- Set response variable.
- Define predictor variables.
- Specify validation method.
- Choose Bootstrap Forest method.
- Set bootstrap portion to 1.
- Limit number of terms to 3.
- Set number of trees to 100.
- Execute analysis.
Example 2
Summary: Runs a Bootstrap Forest analysis to identify key factors affecting the 'Log[Y]' response variable, utilizing predictor variables and configuring the model with 100 trees and 5 terms.
Code:
Open("data_table.jmp");
Bootstrap Forest(
Transform Column( "Log[Y]", Formula( Log( :Y ) ) ),
Y( :"Log[Y]"n ),
X( :BMI, :BP, :Total Cholesterol, :LDL, :HDL, :LTG, :Glucose ),
Method( "Bootstrap Forest" ),
Portion Bootstrap( 1 ),
Number Terms( 5 ),
Number Trees( 100 ),
Go,
Profiler(
1,
Confidence Intervals( 1 ),
Arrange in Rows( 4 ),
Term Value(
BMI( 26.376, Lock( 0 ), Show( 1 ) ),
BP( 94.647, Lock( 0 ), Show( 1 ) ),
Total Cholesterol( 189.14, Lock( 0 ), Show( 1 ) ),
LDL( 115.44, Lock( 0 ), Show( 1 ) ),
HDL( 49.788, Lock( 0 ), Show( 1 ) ),
LTG( 4.6414, Lock( 0 ), Show( 1 ) ),
Glucose( 91.26, Lock( 0 ), Show( 1 ) )
)
),
SendToReport(
Dispatch( {}, "Specifications", OutlineBox, {Close( 1 )} ),
Dispatch( {}, "Overall Statistics", OutlineBox, {Close( 1 )} )
)
);
Code Explanation:
- Open data table;
- Create "Log[Y]" column.
- Apply log transformation to "Y".
- Run Bootstrap Forest analysis.
- Set response variable as "Log[Y]".
- Include predictor variables.
- Use Bootstrap Forest method.
- Set bootstrap portion to 1.
- Limit number of terms to 5.
- Use 100 trees.
Example 3
Summary: Runs a Bootstrap Forest analysis to identify key variables and their relationships in the data table, utilizing multiple predictor variables and specifying missing value order.
Code:
Open("data_table.jmp") << Bootstrap Forest(
Y( :Region ),
X( :"pop- m"n, :POP, :Max deg. F Jan, :OZONE, :CO, :SO2, :NO, :PM10, :Lead ),
Missing Value Order( Low( :CO, :PM10 ), High( :OZONE, :SO2, :NO, :Lead ) ),
Method( "Bootstrap Forest" ),
Portion Bootstrap( 1 ),
Number Terms( 7 ),
Number Trees( 100 ),
Go,
Profiler(
1,
Arrange in Rows( 5 ),
Term Value(
"pop- m"n( 1.6426, Lock( 0 ), Show( 1 ) ),
POP( 1642.6, Lock( 0 ), Show( 1 ) ),
Max deg. F Jan( 42.846, Lock( 0 ), Show( 1 ) ),
OZONE( 0.14688, Lock( 0 ), Show( 1 ) ),
CO( 8.383, Lock( 0 ), Show( 1 ) ),
SO2( 0.04714, Lock( 0 ), Show( 1 ) ),
NO( 0.027273, Lock( 0 ), Show( 1 ) ),
PM10( 39.275, Lock( 0 ), Show( 1 ) ),
Lead( 0.1649, Lock( 0 ), Show( 1 ) )
)
)
);
Code Explanation:
- Open data table;
- Perform Bootstrap Forest analysis.
- Set Region as response variable.
- Include multiple predictor variables.
- Define missing value order for some variables.
- Use Bootstrap Forest method.
- Set portion bootstrap to 1.
- Specify number of terms to 7.
- Set number of trees to 100.
- Generate profiler with specific settings.
Example 4
Summary: Runs a Bootstrap Forest analysis to predict Sex based on multiple predictor variables, including Age, Weight, Oxy, Runtime, RunPulse, RstPulse, and MaxPulse.
Code:
Open("data_table.jmp") << Bootstrap Forest(
Y( :Sex ),
X( :Age, :Weight, :Oxy, :Runtime, :RunPulse, :RstPulse, :MaxPulse ),
Method( "Bootstrap Forest" ),
Portion Bootstrap( 1 ),
Number Terms( 6 ),
Number Trees( 100 ),
Go,
Profiler(
1,
Arrange in Rows( 4 ),
Term Value(
Age( 47.677, Lock( 0 ), Show( 1 ) ),
Weight( 77.445, Lock( 0 ), Show( 1 ) ),
Oxy( 47.376, Lock( 0 ), Show( 1 ) ),
Runtime( 10.5861, Lock( 0 ), Show( 1 ) ),
RunPulse( 169.645, Lock( 0 ), Show( 1 ) ),
RstPulse( 53.452, Lock( 0 ), Show( 1 ) ),
MaxPulse( 173.774, Lock( 0 ), Show( 1 ) )
)
)
);
Code Explanation:
- Open data table;
- Apply Bootstrap Forest method.
- Set response variable to Sex.
- Include multiple predictor variables.
- Use Bootstrap Forest algorithm.
- Perform full bootstrap sampling.
- Limit number of terms to 6.
- Create 100 decision trees.
- Generate analysis report.
- Display profiler with arranged rows.
Example 5
Summary: Create and execute a Bootstrap Forest analysis to explore relationships between sepal length, sepal width, petal length, and petal width in a data table.
Code:
dt1 = Open("data_table.jmp");
obj = Bootstrap Forest(
Y( :Sepal length ),
X( :Sepal width, :Petal length, :Petal width ),
Method( "Bootstrap Forest" ),
Column Contributions( 1 ),
Portion Bootstrap( 1 ),
Number Terms( 2 ),
Number Trees( 100 ),
Go
);
Code Explanation:
- Open data table;
- Define bootstrap forest object.
- Set response variable.
- Specify predictor variables.
- Choose bootstrap forest method.
- Enable column contributions.
- Set portion bootstrap to 1.
- Limit number of terms to 2.
- Set number of trees to 100.
- Execute analysis.
Example 6
Summary: Fits a Bootstrap Forest model to predict continuous outcomes, utilizing various technical features such as validation columns and Shapley values.
Code:
dt4 = Open("data_table.jmp");
obj4 = dt4 << Bootstrap Forest(
Y( :Y ),
X( :Age, :Gender, :BMI, :BP, :Total Cholesterol, :LDL, :HDL, :TCH, :LTG, :Glucose ),
Validation( :Validation ),
Method( "Bootstrap Forest" ),
Portion Bootstrap( 1 ),
Number Terms( 8 ),
Number Trees( 14 ),
Go,
Profiler( 1, Arrange in Rows( 6 ), )
);
dt4 << Clear Row States << Select Rows( Index( 50, N Row( dt4 ) ) ) << Exclude;
profiler[1] << Profiler(
1,
Desirability Functions( 1 ),
Shapley Set Random Seed( 12345 ),
Shapley Background Data Choice( Percent training data set ),
Shapley Percent Training Data( 60 )
);
profiler[1] << Save Shapley Values;
dt4:SHAP Intercept << Exclude( 0 );
dt4 << New Column( "Sum of SHAP",
Formula(
Sum(
:SHAP Intercept,
:SHAP Age,
:SHAP Gender,
:SHAP BMI,
:SHAP BP,
:SHAP Total Cholesterol,
:SHAP LDL,
:SHAP HDL,
:SHAP TCH,
:SHAP LTG,
:SHAP Glucose
)
)
);
obj4 << Save Predicteds;
dt4 << New Column( "Absolute Deviation", Formula( Abs( :Sum of SHAP - :Y Predicted ) ), hide );
dt4 << New Column( "Max Deviation", Formula( Col Max( :Absolute Deviation ) ), hide );
Window( "data_table - Bootstrap Forest of Y" ) << close window;
Code Explanation:
- Open data table;
- Fit Bootstrap Forest model.
- Specify response variable.
- Define predictor variables.
- Use validation column.
- Choose Bootstrap Forest method.
- Set bootstrap portion.
- Specify number of terms.
- Set number of trees.
- Run model and open profiler.
Bootstrap Forest using Set Name
Summary: Executes Bootstrap Forest analysis for multiple samples, configuring various parameters and applying sample presets to generate reports.
Code:
plat_samples = ["Bootstrap Forest" => {"Bootstrap Forest with 1000 Trees"}, => {}];
dt = Open("data_table.jmp");
dt:Y << Set Name( "Y Var" );
For Each( {sample}, plat_samples["Bootstrap Forest"],
obj = dt << Bootstrap Forest(
Y( :Y Var ),
X( :Age, :Gender, :BMI, :BP, :Total Cholesterol, :LDL, :HDL, :TCH, :LTG, :Glucose ),
Minimum Splits Per Tree( 5 ),
Portion Bootstrap( 1 ),
Number Terms( 3 ),
Number Trees( 25 ),
Go
);
Eval( Eval Expr( obj << Apply Preset( "Sample Presets", Expr( sample ) ) ) );
obj << Set Report Title( sample );
);
Code Explanation:
- Define preset samples.
- Open data table;
- Rename Y variable.
- Loop through samples.
- Run Bootstrap Forest analysis.
- Set Y variable.
- Specify predictor variables.
- Configure minimum splits.
- Set bootstrap portion.
- Define number of terms.
- Set number of trees.
- Execute analysis.
- Apply sample preset.
- Set report title.
Bootstrap Forest using Set Modeling Type
Summary: Runs a Bootstrap Forest analysis to model the relationship between various predictors and the response variable REASON, utilizing nominal modeling types for DEROG and DELINQ.
Code:
dt = Open("data_table.jmp");
dt:DEROG << Set Modeling Type( "nominal" );
dt:DELINQ << Set Modeling Type( "nominal" );
dt << Bootstrap Forest(
Y( :REASON ),
X( :BAD, :LOAN, :MORTDUE, :VALUE, :JOB, :YOJ, :DEROG, :DELINQ, :CLAGE, :NINQ, :CLNO, :DEBTINC ),
Validation( :Validation ),
Missing Value Order( Low( :YOJ, :CLAGE, :NINQ, :CLNO, :DEBTINC ), High( :MORTDUE, :VALUE ) ),
Method( "Bootstrap Forest" ),
Portion Bootstrap( 1 ),
Number Terms( 9 ),
Number Trees( 100 ),
Go,
Profiler(
1,
Arrange in Rows( 7 ),
Term Value(
BAD( 0, Lock( 0 ), Show( 1 ) ),
LOAN( 18608, Lock( 0 ), Show( 1 ) ),
MORTDUE( 73760, Lock( 0 ), Show( 1 ) ),
VALUE( 101780, Lock( 0 ), Show( 1 ) ),
JOB( "Office", Lock( 0 ), Show( 1 ) ),
YOJ( 8.922, Lock( 0 ), Show( 1 ) ),
DEROG( 3, Lock( 0 ), Show( 1 ) ),
DELINQ( 4, Lock( 0 ), Show( 1 ) ),
CLAGE( 179.8, Lock( 0 ), Show( 1 ) ),
NINQ( 1.186, Lock( 0 ), Show( 1 ) ),
CLNO( 21.296, Lock( 0 ), Show( 1 ) ),
DEBTINC( 33.78, Lock( 0 ), Show( 1 ) )
)
)
);
Code Explanation:
- Open data table;
- Set DEROG modeling type to nominal.
- Set DELINQ modeling type to nominal.
- Run Bootstrap Forest analysis.
- Specify REASON as response variable.
- Include multiple predictors in model.
- Use Validation column for validation.
- Set missing value order for specific columns.
- Choose Bootstrap Forest method.
- Generate profiler with specific settings.
Bootstrap Forest using Formula Depot
Summary: Runs a data analysis workflow by running Lasso Poisson and Bootstrap Forest scripts, generating code for various programming languages, and copying scripts to the clipboard.
Code:
dt = Open("data_table.jmp");
fd = Formula Depot();
obj1 = dt << Run Script( "Lasso Poisson, Validation Column" );
md1 = obj1 << (Fit[1] << Publish Prediction Formula);
obj2 = dt << Bootstrap Forest(
Y( :Validation ),
X( :BMI, :Age, :Time ),
Method( "Bootstrap Forest" ),
Portion Bootstrap( 1 ),
Number Terms( 1 ),
Number Trees( 100 ),
Go,
SendToReport( Dispatch( {}, "Per-Tree Summaries", OutlineBox, {Close( 0 )} ) )
);
md2 = obj2 << Publish Prediction Formula;
obj1 << Close Window;
obj2 << Close Window;
codeC = fd << Generate C Code( Formulas( md1 ), NoEditor );
codeP = fd << Generate Python Code( Formulas( md2 ), NoEditor );
codeJs = fd << Generate JavaScript Code( Formulas( md1, md2 ), NoEditor );
codeS = fd << Generate SAS Code( Formulas( md1, md2 ), NoEditor );
codeQ = fd << Generate SQL Code( Formulas( {md1, md2} ), NoEditor );
fd << Run Scripts( Table( "data_table" ), Formulas( 1 ) );
For( loopCnt = 1, loopCnt <= 10, loopCnt++,
fd << Copy Scripts( Formulas( 2 ) );
clip_text = Get Clipboard();
If( Is String( clip_text ) & Contains( clip_text, "New Column(" ) > 0,
Break()
);
);
Code Explanation:
- Open data table;
- Create Formula Depot.
- Run Lasso Poisson script.
- Publish prediction formula.
- Perform Bootstrap Forest analysis.
- Publish prediction formula.
- Close both analysis windows.
- Generate C code.
- Generate Python code.
- Generate JavaScript code.
- Generate SAS code.
- Generate SQL code.
- Run scripts on table.
- Loop to copy scripts.
- Check clipboard for new column.
Bootstrap Forest using If
Example 1
Summary: Runs a Bootstrap Forest analysis with local data filtering on Gender and Age, utilizing multiple predictor variables for Y Binary response.
Code:
If( JMP Product Name() == "Pro",
dt1 = Open("data_table.jmp");
BootStrapFor_LDF = dt1 << Bootstrap Forest(
Y( :Y Binary ),
X( :Age, :Gender, :BMI, :BP, :Total Cholesterol, :LDL, :HDL, :TCH, :LTG, :Glucose ),
Validation( :Validation ),
Multithreading( 0 ),
Set Random Seed( 12345 ),
Method( "Bootstrap Forest" ),
Minimum Splits per Tree( 5 ),
Maximum Splits per Tree( 200 ),
Portion Bootstrap( 0.747572815533981 ),
Number Terms( 10 ),
Number Trees( 20 ),
Go
);
BootStrapFor_LDF << Local Data Filter(
Add Filter( columns( :Gender, :Age ), Where( :Gender == 2 ), Where( :Age >= 60 & :Age <= 79 ) )
);
OverallStats = Report( BootStrapFor_LDF )[Outline Box( "Bootstrap Forest for Y Binary" )][Outline Box( "Overall Statistics" )][
Table Box( 1 )] << Make Into Data Table;
vals = OverallStats << get as matrix;
text1 = (Report( BootStrapFor_LDF ) << Parent)[Outline Box( 1 )][Text Box( 1 )] << Get Text;
Close( OverallStats, nosave );
Close( dt1, nosave );
);
Code Explanation:
- Check if JMP is Pro.
- Open data table;
- Run Bootstrap Forest analysis.
- Set response variable to Y Binary.
- Include multiple predictor variables.
- Specify validation column.
- Disable multithreading.
- Set random seed for reproducibility.
- Use Bootstrap Forest method.
- Apply local data filter on Gender and Age.
Example 2
Summary: Runs a Bootstrap Forest analysis to predict binary outcomes using a weighted dataset, with validation and training weights applied.
Code:
If( Contains( JMP Product Name(), "Pro" ) > 0,
dt = Open("data_table.jmp");
obj = dt << Bootstrap Forest(
Y( :Y Binary ),
X( :Age, :BMI, :BP, :Total Cholesterol, :LDL, :HDL, :TCH, :LTG, :Glucose ),
Weight( :Gender ),
Validation( :Validation ),
Set Random Seed( 12345 ),
Method( "Bootstrap Forest" ),
Portion Bootstrap( 1 ),
Number Terms( 7 ),
Number Trees( 17 ),
Go
);
obj << Save Prediction Formula( 1 );
b wgt count training = [330 0, 15 112];
b wgt count validation = [122 13, 21 36];
mr1 = (0 + 15) / Sum( [330 0, 15 112] );
mr2 = (13 + 21) / Sum( [122 13, 21 36] );
rpt = obj << report;
stat1 = rpt["Overall Statistics"][Table Box( 1 )] << get as matrix;
Close( dt, no save );
);
Code Explanation:
- Check for JMP Pro.
- Open data table;
- Run Bootstrap Forest analysis.
- Specify binary outcome variable.
- Define predictor variables.
- Apply weight variable.
- Use validation column.
- Set random seed.
- Choose Bootstrap Forest method.
- Configure bootstrap portion.
- Set number of terms.
- Set number of trees.
- Execute analysis.
- Save prediction formula.
- Define training weights.
- Define validation weights.
- Calculate training misclassification rate.
- Calculate validation misclassification rate.
- Retrieve overall statistics report.
- Extract statistics into matrix.
- Close dataset without saving.
Example 3
Summary: Executes a Bootstrap Forest model in JMP Pro, specifying response and predictor variables, validation column, and model parameters.
Code:
If( Contains( JMP Product Name(), "Pro" ) > 0,
dt = Open("data_table.jmp");
obj = dt << Bootstrap Forest(
Y( :Y ),
X( :Age, :Gender, :BMI, :BP, :Total Cholesterol, :LDL, :HDL, :TCH, :LTG, :Glucose ),
Validation( :Validation ),
Minimum Splits Per Tree( 5 ),
Portion Bootstrap( 1 ),
Number Terms( 3 ),
Number Trees( 3 ),
Set Random Seed( 123 ),
Go
);
rpt = obj << report;
nsplits = (rpt["Per-Tree Summaries"][Table Box( 1 )] << get as matrix)[0, 2];
Close( dt, no save );
);
Code Explanation:
- Check for JMP Pro.
- Open data table;
- Run Bootstrap Forest model.
- Specify response variable.
- Specify predictor variables.
- Use validation column.
- Set minimum splits.
- Set bootstrap portion.
- Limit number of terms.
- Set number of trees.
Example 4
Summary: Creates and analyzes two Bootstrap Forest models for log height, utilizing sex, age, and weight as predictors in JMP Pro.
Code:
If( Contains( JMP Product Name(), "Pro" ) > 0,
dt = Open("data_table.jmp");
obj1 = Bootstrap Forest(
Y( Transform Column( "Log height", Formula( Log( :height ) ) ), ),
X( :sex, :age, :weight ),
Set Random Seed( 345 ),
Go
);
obj1 << Save Residuals( 1 );
obj1 << Save Prediction Formula( 1 );
obj1 << Save Predicteds( 1 );
dt << New Column( "height mod", numeric, Formula( Log( :height ) ) );
obj2 = Bootstrap Forest( Y( :height mod ), X( :sex, :age, :weight ), Set Random Seed( 345 ), Go );
obj2 << Save Residuals( 1 );
obj2 << Save Prediction Formula( 1 );
obj2 << Save Predicteds( 1 );
Close( dt, no save );
);
Code Explanation:
- Check if JMP Pro.
- Open data table;
- Create Bootstrap Forest for log height.
- Use sex, age, weight as predictors.
- Set random seed to 345.
- Run the model.
- Save residuals for model 1.
- Save prediction formula for model 1.
- Save predicted values for model 1.
- Add "height mod" column.
- Create Bootstrap Forest for "height mod".
- Use sex, age, weight as predictors.
- Set random seed to 345.
- Run the model.
- Save residuals for model 2.
- Save prediction formula for model 2.
- Save predicted values for model 2.
- Close the dataset without saving.
Example 5
Summary: Executes a Bootstrap Forest model to predict age categories based on height, weight, and sex, generating two reports with prediction profiler results.
Code:
If( Contains( JMP Product Name(), "Pro" ),
dt = Open("data_table.jmp");
obj1 = dt << Bootstrap Forest(
Y( :age ),
X( :height, :weight, :sex ),
Go,
Profiler(
1,
Desirability Functions( 1 ),
:age << Category Desirability( {12, 0.35}, {13, 0.45}, {14, 0.65}, {15, 0.9}, {16, 0.2}, {17, 0.1} ),
Term Value( height( 62.55 ), weight( 105 ), sex( "F" ) )
)
);
rpt1 = obj1 << report;
obj1 << Save Prediction Formula;
d1 = Parse( Substr( rpt1["Prediction Profiler"][AxisBox( 2 )] << get text, 13 ) );
obj2 = dt << Profiler(
Y( :"Prob(age==12)"n, :"Prob(age==13)"n, :"Prob(age==14)"n, :"Prob(age==15)"n, :"Prob(age==16)"n, :"Prob(age==17)"n ),
Profiler(
1,
Desirability Functions( 1 ),
:age << Category Desirability( {12, 0.35}, {13, 0.45}, {14, 0.65}, {15, 0.9}, {16, 0.2}, {17, 0.1} ),
Term Value( height( 62.55, Lock( 0 ), Show( 1 ) ), weight( 105, Lock( 0 ), Show( 1 ) ) )
)
);
rpt2 = obj2 << report;
d2 = Parse( Substr( rpt2["Prediction Profiler"][AxisBox( 2 )] << get text, 13 ) );
Close( dt, no save );
);
Code Explanation:
- Check for JMP Pro.
- Open data table;
- Run Bootstrap Forest model.
- Configure Profiler settings.
- Define age category desirabilities.
- Set term values for height, weight, and sex.
- Generate first report.
- Save prediction formula.
- Extract prediction formula text.
- Run second Profiler for probabilities.
- Generate second report.
- Extract probability formula text.
- Close dataset without saving.
Bootstrap Forest using Fit Group
Summary: Runs the analysis and comparison of two data tables by creating new columns, running Bootstrap Forest models, and generating confusion matrix tables.
Code:
dt = Open("data_table.jmp");
objA = dt << Fit Group(
Transform Column( "Lowercase[Meal]", Character, Formula( Lowercase( :Meal ) ) ),
Transform Column( "Abs[Protein]", Formula( Abs( :Protein ) ) ),
Transform Column( "Lowercase[Item Name]", Character, Formula( Lowercase( :Item Name ) ) ),
Bootstrap Forest(
:"Abs[Protein]"n,
:"Lowercase[Meal]"n,
Y( :"Lowercase[Meal]"n ),
X( :"Abs[Protein]"n ),
Method( "Bootstrap Forest" ),
Portion Bootstrap( 1 ),
Number Terms( 1 ),
Number Trees( 100 ),
Go
),
Bootstrap Forest(
:"Abs[Protein]"n,
:"Lowercase[Item Name]"n,
Y( :"Lowercase[Item Name]"n ),
X( :"Abs[Protein]"n ),
Method( "Bootstrap Forest" ),
Portion Bootstrap( 1 ),
Number Terms( 1 ),
Number Trees( 100 ),
Go
)
);
dta1 = Report( objA )["Overall Statistics", "Confusion Matrix", Table Box( 1 )] << Make Into Data Table;
dta2 = Report( objA )["Overall Statistics", "Confusion Matrix", Table Box( 2 )] << Make Into Data Table;
objB = objA << Redo Analysis;
dtb1 = Report( objB )["Overall Statistics", "Confusion Matrix", Table Box( 1 )] << Make Into Data Table;
dtb2 = Report( objB )["Overall Statistics", "Confusion Matrix", Table Box( 2 )] << Make Into Data Table;
ct = dta1 << Compare Data Tables(
Compare with( dtb1 ),
Compare table properties,
Compare column attributes and properties,
Compare data,
Show difference summary,
Show difference plot
);
ct << close window;
ct = dta2 << Compare Data Tables(
Compare with( dtb2 ),
Compare table properties,
Compare column attributes and properties,
Compare data,
Show difference summary,
Show difference plot
);
ct << close window;
Close( dta1, nosave );
Close( dta2, nosave );
Close( dtb1, nosave );
Code Explanation:
- Open data table;
- Create lowercase meal column.
- Create absolute protein column.
- Create lowercase item name column.
- Run first Bootstrap Forest analysis.
- Run second Bootstrap Forest analysis.
- Extract first confusion matrix table.
- Extract second confusion matrix table.
- Redo analysis.
- Extract new confusion matrix tables.