Actionable-Insights API

The Actionable Insights feature can be accessed via an API to integrate the capabilities in external systems. 

Endpoint

To generate Actionable Insights from an XAI Instance use the following POST request endpoint:

	/api/actionable-insights/generate

For example:

	https://my.app.logicalglue.net/api/actionable-insights/generate
	https://our-business.app.temenosxai.com/api/actionable-insights/generate

Request Body

The request body has 4 top level attributes

Table 1: Top level attributes

Attribute Key Attribute Value description
data Map of feature objects. The key in this map is the feature name, the value is a Feature Name object, see Table 2 for the description of the feature objects
modelKey The key for the model being inferenced 
targetClass The class that the insights should target as the result category
targetValue The value the insights should target as the score

Table 2: Feature Name object attributes

Attribute Key Attribute Value description
value The current value of this feature, can be numeric value or string value
isDesignVariable If true this feature will be modified by actionable insights, must be boolean ('true' or 'false')
lowerBound Only required if isDesignVariable is 'true' & feature type is continuous or mixed.  This will be the lower bound numeric value insights will use
upperBound Only required if isDesignVariable is 'true' & feature type is continuous or mixed.  This will be the upper bound numeric value insights will use
categories Only required if isDesignVariable is 'true' & feature type is categorical or mixed.  This will be a string list of categories insights will use
cost Only required if isDesignVariable is 'true'. This can only be low medium or high and it is the relative cost of changing this feature

An example request body:

{
    "data": {
        "Continuous feature 1": {
            "value": 1500,
            "isDesignVariable": true,
            "lowerBound": 500,
            "upperBound": 35000,
            "cost": "high"
        },
        "Categorical feature 1": {
            "value": "36 Months",
            "isDesignVariable": true,
            "categories": [
                "36 Months",
                "60 Months",
                "90 Months",
            ],
            "cost": "low"
        },
        "Continuous feature 2": {
            "value": 2,
            "isDesignVariable": true,
            "lowerBound": 0,
            "upperBound": 10,
            "cost": "low"
        },
        "Categorical feature 2": {
            "value": "Apple",
            "isDesignVariable": false
        },
        "Continuous feature 3": {
            "value": 4000,
            "isDesignVariable": false
        },
        "Categorical feature 3": {
            "value": "Distance",
            "isDesignVariable": false
        },
        "Categorical feature 4": {
            "value": "T11A",
            "isDesignVariable": false
        },
        "Mixed Feature 1": {
            "value": 0,
            "isDesignVariable": true,
            "lowerBound": 0,
            "upperBound": 34.98,
            "categories": [
                "Monday",
                "Tuesday",
                "Weekends"
            ],
            "cost": "medium"
        }
    },
    "modelKey": "87fgg555-aaaa-1111-1a1a-a11a1aa11a11",
    "targetClass": "Uncreditworthy",
    "targetValue": 0.3
}

Still need help? Contact Us Contact Us