I did step 1 first: manually click "GO" in the menu interface of the window and wait for the completion of decision tree operation.
I want to use JSL for the next step: how do code JSL to save the window menu operation to "save prediction formula" in the data table?Thank you very much!
p<<save prediction formula;
Here is the example from the Scripting Indix for the Partition Platform for Saving Prediction Formula
Help==>Scripting Index...............Partition==>Save Predicion Formula
Names Default To Here( 1 ); obj = Open( "$SAMPLE_DATA/Boston Housing.jmp" ) << Partition( Y( :mvalue ), X( :crim, :zn, :indus, :chas, :nox, :rooms, :age, :distance, :radial, :tax, :pt, :b, :lstat ), Split Best( 4 ) ); obj << Save Prediction Formula;
This might be more generic than what I think you requested. Jim might have a better solution. Note the syntax to get the scrciptable object in case you want to sen messages to the Partition object. This assumes only one partition window and gets the first one.
Names Default to Here(1); rptList = Get WindowList("Reports"); //Assuming one partition For(i=1, i<=nitems(rptList), i++, ttl = rptList[i] << get window title; If (contains(ttl, "- Partition of"), treeref = rptList[i]; dtref = (treeref[Outline Box(1)] << get scriptable object) << get data table; dtnme = dtref << get name; varnme = Munger( ttl, 1, dtnme || " - Partition of ",""); Break(); ); ); show(ttl, dtnme, varnme, treeref<<get window title); func = column(dtref, varnme || " Predictor") << get formula; show(func);
There are no labels assigned to this post.