cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Choose Language Hide Translation Bar
abmayfield
Level VI

Combining many columns for testing interactions in the predictive modeling platforms

I have a dataset in which I have many predictors, and I want to do second order factorials of them all (i.e., all possible interactions). Normally, if I use "Fit model," I simply select all predictors, set the factorial to 2, then select "factorial to degree." However, for other platforms, this factorial/interaction feature isn't supported. Therefore, I need to combine 14 columns, i.e. 14^2 = almost 200 new columns to be created. Now, I could use the "combine columns" feature under the "Cols" menu 200 times, but I suspect there may be a way to do this in a much simpler manner (and maybe even without the need for JSL).

 

I tried simply copying the second order factorials from the "Construct model effects" box of Fit Model and pasting it into the neural platform, but that doesn't work. I'm starting to think the issue is simply that certain (if not all) predictive modeling platforms do NOT accept interaction effects. This is why I'm thinking I'll need to manually make interaction columns instead. Any ideas?

Anderson B. Mayfield
1 ACCEPTED SOLUTION

Accepted Solutions
abmayfield
Level VI

Re: Combining many columns for testing interactions in the predictive modeling platforms

Sorry, I meant to address my response to Georg to both of you. That's a great point about exploiting model screening to do second-order interactions (especially when the platform itself doesn't support such interactions). Knowing that, as well as the fact that some of the methods actually consider interactions inherently, I think I can get most of what I need to do done!

Anderson B. Mayfield

View solution in original post

4 REPLIES 4
Victor_G
Super User

Re: Combining many columns for testing interactions in the predictive modeling platforms

Hello @abmayfield,

 

If you construct your model (any kind of Machine Learning model in JMP Pro, neural networks, ...) through the "Model Screening" platform (in Analyze, Predictive Modeling, and then Model Screening), you can specify interactions and quadratic effects in a lot of different models, including neural networks (see screenshot "Model_screening_options"). 

You also have some other options for validation, like cross-validations, column validation, etc...

 

When the comparison of models will be done, you can from then open the specific modeling panel of any model tested.

Hope this will help you,

Victor GUILLER
Scientific Expertise Engineer
L'Oréal - Data & Analytics
Georg
Level VII

Re: Combining many columns for testing interactions in the predictive modeling platforms

Dear @abmayfield , I think there is no need to specify 2nd order effects, as models like neural and boosted tree can model them naturally, as they are complex enough. You can try below example, and e.g. in the profiler you can specifiy to review the interactions w/o having specified them for neural. Higher order effects are needed to specify especially for regression models, because w/o the formula behind would not allow quadratic effects or interactions.

 

Names Default To Here( 1 );
dt = Open( "$SAMPLE_DATA/Tiretread.jmp" );
obj = dt << Profiler(
	Y(
		:Pred Formula ABRASION, :Pred Formula MODULUS, :Pred Formula ELONG,
		:Pred Formula HARDNESS
	)
);
obj << Interaction Profiler( 1 );

Neural(
	Y( :ABRASION, :MODULUS, :ELONG, :HARDNESS ),
	X( :SILICA, :SILANE, :SULFUR ),
	Informative Missing( 0 ),
	Validation Method( "Holdback", 0.3333 ),
	Fit(
		NTanH( 3 ),
		Profiler(
			1,
			Desirability Functions( 1 ),
			Interaction Profiler( 1 ),
			Term Value(
				SILICA( 1.2, Lock( 0 ), Show( 1 ) ),
				SILANE( 50, Lock( 0 ), Show( 1 ) ),
				SULFUR( 2.3, Lock( 0 ), Show( 1 ) )
			)
		)
	)
);

 

Georg
abmayfield
Level VI

Re: Combining many columns for testing interactions in the predictive modeling platforms

Georg, thanks and that is a great point that I thought about more after posting (and shows my naivete). I definitely think the neural network inherently considers interactions. I do know that in model screening, you can check the box to consider quadratics or even second-order effects....even for modeling times that don't consider them in the platform itself (e.g., neural). AND, I totally FORGOT about the interaction profiler, which will be SUPER helpful for what I'm wanting to do, so again, thanks so much for your comments and suggestions!

Anderson B. Mayfield
abmayfield
Level VI

Re: Combining many columns for testing interactions in the predictive modeling platforms

Sorry, I meant to address my response to Georg to both of you. That's a great point about exploiting model screening to do second-order interactions (especially when the platform itself doesn't support such interactions). Knowing that, as well as the fact that some of the methods actually consider interactions inherently, I think I can get most of what I need to do done!

Anderson B. Mayfield