Building Apps that use the Decision Tree Editor
- A JSON configuration file that is either tagged as decision-tree-cfg or has the same name as the decision tree itself (preferred). The file must have a .json extension.
- An input data file in CSV or ZIP format that is either tagged as decision-tree-data or has the same name as the decision tree itself (preferred).
Note Xpress Insight has an upper size limit of 150MB for all attachments.
For the profiling and best split operations to run successfully, there needs to be a column in the dataset containing data for each of the profile variables and predictors defined in the tree.
This JSON Configuration file provides important metadata to the decision tree editor. An example:
{ "predictors": [ { "name":"DK1", "displayName":"Predictor 1", "type": "real", “class”: “continuous” }, { "name":"DK2", "displayName":"Predictor 2", "type": "string", "constraints": ["category1", "category2"], “class”: “categorical” } ], "treatments": [ { "actionId": "1234", "name":"T1", "displayName":"Treatment 1", "type": "string" } ], "profileVariables": [ { "name":"PV1", "displayName": "Profile Variable 1", "profileType":"continuous" }, { "name":"PV2", "displayName": "Profile Variable 2", "profileType":"categorical", "categories": ["category1", "category2"], “defaultTarget”: true } ], "sampleWeight": "mySampleWeightVar", “dataSetName”: “Name of my dataset” }
- Predictors
These variables are the possible levels in the tree and will be available for selection by the user in the Predictors panel. The attributes describe the predictor with the type representing the type of the data (integer, real, string, date, datetime, boolean) and the class representing whether the data is continuous or categorical in nature.
In earlier versions of Xpress Insight, predictors were referred to as decision keys and defined in the config file using the decisionKeys attribute. This is now deprecated in favor of predictors but is still supported for backwards compatibility with earlier configuration files.
- Treatments
These values are the possible leaf node values for the tree. They will be available for selection in the treatment library.
- Profile variables
These variables are the possible variables that can be profiled through the tree. They will be available in the Profiles panel. All categorical profile variables are also treated as possible targets for the tree and will be available for selection by the user in the Target dialog.
The attributes describe the profile variable with the profileType defining the variable as either continuous or categorical. Categorical variables should also define an array of the possible categories. If one of the profile variables should be treated as the default target by the UI then specify defaultTarget to be true.
- Sample weight
The name of a column to be interpreted as a sample weight for each row.
- Name of the dataset
For display in the properties section of the tree editor.
See the FICO Xpress Insight Web Client User Guide for a detailed overview of the facilities provided for end-user decision tree editing.