OMS Issue with TREE vs DMTREE?

classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

OMS Issue with TREE vs DMTREE?

Tim Graettinger
Hi,

I'm trying to use OMS to capture some output (Gains for Nodes) from a decision tree run.  When I use the OMS menu to design the capture, the only option I can find is based on DMTREE, not TREE.  The manual states that "DMTREE is available in SPSS Statistics Premium Edition or the Direct Marketing option.  This is an alias for TREE."  The manual entry for TREE starts with the statement, "TREE is available in SPSS Statistics Professional Edition or the Decision Trees option."  I am licensed for the Decision Tree module.

When I run the code below, I get an empty table.  If I change 'TREE' to 'DMTREE' in the OMS command, I get a message saying "There is no license for SPSS Direct Marketing."  There must be a way for me to capture the output, but I can't figure it out.  Any thoughts and help will be much appreciated.  Thanks,
-Tim

----------------------------

DATASET DECLARE  dGainsForNodes.
OMS /SELECT TABLES /IF COMMANDS=['TREE'] SUBTYPES=['Gains For Nodes'] /DESTINATION FORMAT=SAV NUMBERED=TableNumber_ OUTFILE='dGainsForNodes' VIEWER=YES /TAG='dGainsForNodes'.

BEGIN PROGRAM PYTHON.
p_ModelTreeChaid_MaxDepth    =  5
p_ModelTreeChaid_MinParentSize = 60
p_ModelTreeChaid_MinChildSize  = 30
p_ModelTreeChaid_NumberOfFolds = 3
p_ModelTreeChaid_Intervals =  3

spss.Submit('''
TREE
%s
 BY
%s
  /TREE DISPLAY=TOPDOWN NODES=STATISTICS BRANCHSTATISTICS=YES NODEDEFS=YES SCALE=100
  /DEPCATEGORIES USEVALUES=[0 1] TARGET=[1]
  /PRINT MODELSUMMARY CLASSIFICATION RISK
  /GAIN CATEGORYTABLE=YES TYPE=[NODE] SORT=DESCENDING CUMULATIVE=NO
  /PLOT GAIN INCREMENT=1
  /METHOD TYPE=CHAID
  /GROWTHLIMIT MAXDEPTH=%s MINPARENTSIZE=%s MINCHILDSIZE=%s
  /VALIDATION TYPE=CROSSVALIDATION(%s) OUTPUT=BOTHSAMPLES
  /CHAID ALPHASPLIT=0.05 ALPHAMERGE=0.05 SPLITMERGED=NO CHISQUARE=PEARSON CONVERGE=0.001 MAXITERATIONS=100 ADJUST=BONFERRONI INTERVALS=%s
  /COSTS EQUAL.
'''%(eTarget[0],' '.join(eCandidate),p_ModelTreeChaid_MaxDepth,p_ModelTreeChaid_MinParentSize,p_ModelTreeChaid_MinChildSize,p_ModelTreeChaid_NumberOfFolds,p_ModelTreeChaid_Intervals))
END PROGRAM.

OMSEND TAG=['dGainsForNodes'].

=====================
To manage your subscription to SPSSX-L, send a message to
[hidden email] (not to SPSSX-L), with no body text except the
command. To leave the list, send the command
SIGNOFF SPSSX-L
For a list of commands to manage subscriptions, send the command
INFO REFCARD
Reply | Threaded
Open this post in threaded view
|

Re: OMS Issue with TREE vs DMTREE?

Jon Peck
The correct command name for TREE is not, as you might expect, "TREE".  It is "Classification Tree", which you can see in the Command Identifiers column of the OMS Control Panel or in the OMS Identifiers dialog.  Usually the command identifier for OMS matches the syntax, but for historical reasons there are some exceptions.

So your OMS command might look like
OMS
  /SELECT TABLES
  /IF COMMANDS=['Classification Tree'] SUBTYPES=['Gains For Nodes'].

Two other points.  You don't need to specify a COMMAND for OMS unless it is needed to further restrict the SUBTYPES specification.  You only need it if there is a table with the same subtype but from a different command that might occur in the OMS scope or if you are selecting multiple outputs from a command.

Second, you can right click on an instance of the outline entry for the object in question and select Copy OMS Command Identifier or Copy OMS Table Subtype to find the appropriate values to use in the OMS command.  This is often more convenient than the Control Panel approach.  It is also necessary to capture objects from extension commands, since their properties do not appear in the OMS Control Panel or OMS Identifiers dialogs.



On Wed, Oct 31, 2018 at 5:51 AM Tim Graettinger <[hidden email]> wrote:
Hi,

I'm trying to use OMS to capture some output (Gains for Nodes) from a decision tree run.  When I use the OMS menu to design the capture, the only option I can find is based on DMTREE, not TREE.  The manual states that "DMTREE is available in SPSS Statistics Premium Edition or the Direct Marketing option.  This is an alias for TREE."  The manual entry for TREE starts with the statement, "TREE is available in SPSS Statistics Professional Edition or the Decision Trees option."  I am licensed for the Decision Tree module.

When I run the code below, I get an empty table.  If I change 'TREE' to 'DMTREE' in the OMS command, I get a message saying "There is no license for SPSS Direct Marketing."  There must be a way for me to capture the output, but I can't figure it out.  Any thoughts and help will be much appreciated.  Thanks,
-Tim

----------------------------

DATASET DECLARE  dGainsForNodes.
OMS /SELECT TABLES /IF COMMANDS=['TREE'] SUBTYPES=['Gains For Nodes'] /DESTINATION FORMAT=SAV NUMBERED=TableNumber_ OUTFILE='dGainsForNodes' VIEWER=YES /TAG='dGainsForNodes'.

BEGIN PROGRAM PYTHON.
p_ModelTreeChaid_MaxDepth    =  5
p_ModelTreeChaid_MinParentSize = 60
p_ModelTreeChaid_MinChildSize  = 30
p_ModelTreeChaid_NumberOfFolds = 3
p_ModelTreeChaid_Intervals =  3

spss.Submit('''
TREE
%s
 BY
%s
  /TREE DISPLAY=TOPDOWN NODES=STATISTICS BRANCHSTATISTICS=YES NODEDEFS=YES SCALE=100
  /DEPCATEGORIES USEVALUES=[0 1] TARGET=[1]
  /PRINT MODELSUMMARY CLASSIFICATION RISK
  /GAIN CATEGORYTABLE=YES TYPE=[NODE] SORT=DESCENDING CUMULATIVE=NO
  /PLOT GAIN INCREMENT=1
  /METHOD TYPE=CHAID
  /GROWTHLIMIT MAXDEPTH=%s MINPARENTSIZE=%s MINCHILDSIZE=%s
  /VALIDATION TYPE=CROSSVALIDATION(%s) OUTPUT=BOTHSAMPLES
  /CHAID ALPHASPLIT=0.05 ALPHAMERGE=0.05 SPLITMERGED=NO CHISQUARE=PEARSON CONVERGE=0.001 MAXITERATIONS=100 ADJUST=BONFERRONI INTERVALS=%s
  /COSTS EQUAL.
'''%(eTarget[0],' '.join(eCandidate),p_ModelTreeChaid_MaxDepth,p_ModelTreeChaid_MinParentSize,p_ModelTreeChaid_MinChildSize,p_ModelTreeChaid_NumberOfFolds,p_ModelTreeChaid_Intervals))
END PROGRAM.

OMSEND TAG=['dGainsForNodes'].

=====================
To manage your subscription to SPSSX-L, send a message to
[hidden email] (not to SPSSX-L), with no body text except the
command. To leave the list, send the command
SIGNOFF SPSSX-L
For a list of commands to manage subscriptions, send the command
INFO REFCARD


--
Jon K Peck
[hidden email]

===================== To manage your subscription to SPSSX-L, send a message to [hidden email] (not to SPSSX-L), with no body text except the command. To leave the list, send the command SIGNOFF SPSSX-L For a list of commands to manage subscriptions, send the command INFO REFCARD
Reply | Threaded
Open this post in threaded view
|

Re: OMS Issue with TREE vs DMTREE?

Tim Graettinger
In reply to this post by Tim Graettinger
Thanks, Jon, very helpful advice.  Once I plugged in 'Classification Tree', everything worked well.

You mentioned, "you can right click on an instance of the outline entry for the object in question and select Copy OMS Command Identifier or Copy OMS Table Subtype to find the appropriate values to use in the OMS command".  Not sure what you mean by the "outline entry".  In a dialog?  In the Command Syntax Reference?  Somewhere else?  This sounds very useful when using extension commands as you noted.

Thanks again,
-Tim

=====================
To manage your subscription to SPSSX-L, send a message to
[hidden email] (not to SPSSX-L), with no body text except the
command. To leave the list, send the command
SIGNOFF SPSSX-L
For a list of commands to manage subscriptions, send the command
INFO REFCARD
Reply | Threaded
Open this post in threaded view
|

Re: OMS Issue with TREE vs DMTREE?

Rick Oliver
Outline pane of the output viewer, where results are displayed.

On Thu, Nov 1, 2018, 9:37 AM Tim Graettinger <[hidden email]> wrote:
Thanks, Jon, very helpful advice.  Once I plugged in 'Classification Tree', everything worked well.

You mentioned, "you can right click on an instance of the outline entry for the object in question and select Copy OMS Command Identifier or Copy OMS Table Subtype to find the appropriate values to use in the OMS command".  Not sure what you mean by the "outline entry".  In a dialog?  In the Command Syntax Reference?  Somewhere else?  This sounds very useful when using extension commands as you noted.

Thanks again,
-Tim

=====================
To manage your subscription to SPSSX-L, send a message to
[hidden email] (not to SPSSX-L), with no body text except the
command. To leave the list, send the command
SIGNOFF SPSSX-L
For a list of commands to manage subscriptions, send the command
INFO REFCARD
===================== To manage your subscription to SPSSX-L, send a message to [hidden email] (not to SPSSX-L), with no body text except the command. To leave the list, send the command SIGNOFF SPSSX-L For a list of commands to manage subscriptions, send the command INFO REFCARD
Reply | Threaded
Open this post in threaded view
|

Re: OMS Issue with TREE vs DMTREE?

Rick Oliver

On Thu, Nov 1, 2018 at 10:30 AM Rick Oliver <[hidden email]> wrote:
Outline pane of the output viewer, where results are displayed.

On Thu, Nov 1, 2018, 9:37 AM Tim Graettinger <[hidden email]> wrote:
Thanks, Jon, very helpful advice.  Once I plugged in 'Classification Tree', everything worked well.

You mentioned, "you can right click on an instance of the outline entry for the object in question and select Copy OMS Command Identifier or Copy OMS Table Subtype to find the appropriate values to use in the OMS command".  Not sure what you mean by the "outline entry".  In a dialog?  In the Command Syntax Reference?  Somewhere else?  This sounds very useful when using extension commands as you noted.

Thanks again,
-Tim

=====================
To manage your subscription to SPSSX-L, send a message to
[hidden email] (not to SPSSX-L), with no body text except the
command. To leave the list, send the command
SIGNOFF SPSSX-L
For a list of commands to manage subscriptions, send the command
INFO REFCARD
===================== To manage your subscription to SPSSX-L, send a message to [hidden email] (not to SPSSX-L), with no body text except the command. To leave the list, send the command SIGNOFF SPSSX-L For a list of commands to manage subscriptions, send the command INFO REFCARD