Setting desirability in a neural net loopHello everyone,
I have a script where I loop through different Neural net settings and as part of the looping I'd like to set the profile to maximize the desirability for a min goal and save the settings then do the same for a max goal as well. I haven't been able to get this work work though. Here is the script I am working with and I've been testing on the diabetes sample data set:
names default to here(1);
dt=current datatable();
selCols = dt << Get column names( String );
obj2=new window("Reponse Variable",
<<MODAL></MODAL>The script will produce two separate saved settings but it is at the same state.
Thanks for any ideas!
Steve
ScriptingRe: Setting desirability in a neural net loopHi @shampton82 ,
Nice bit of code, and I like the idea of what you're intending to do with it.
After trying out the code with the Diabetes data table, here's some feedback to help get you in the right direction, hopefully.
1. delete the pf= in the call for the NN platform. You can then define the pf = report(fit) later on as you want to maximize desirability.
2. if you send the command Set Desirabilities to pf, then a window comes up where you can manually enter maximize or minimize, but I don't see yet how to set it automatically with JSL.
The below code works, but you have to manually edit the window. I'd like to know how to do it through JSL, though.
names default to here(1);
dt=current datatable();
selCols = dt << Get column names( String );
obj2=new window("Reponse Variable",
<<MODAL></MODAL>Hope this at least gets you going in the right direction!,
DS
Re: Setting desirability in a neural net loopI reached out to JMP support for help and this is what they came up with which works great:
"There were a few things going on… the response limits message must point to the column name and must be in a list that itself is a message to the Profiler. Also, it appears you have to reshow the report to get the desirability functions to actually update."
pf = Report( fit )["Prediction Profiler"] << get scriptable object;
Eval( Eval Expr( pf << {Expr( Column( dt, y )) << Response Limits( {Goal( "Minimize" ), Importance( 1 )} )} ) );
Report( fit ) << reshow();
pf << Maximize Desirability;
pf << Remember Settings("Min");
Eval( Eval Expr( pf << {Expr( Column( dt, y )) << Response Limits( {Goal( "Maximize" ), Importance( 1 )} )} ) );
Report( fit ) << reshow();
pf << Maximize Desirability;
pf << Remember Settings("Max");