specializeRule

PatternsResource.specializeRule(request, sub_analysis_id, rule_id, **kwargs)

Prior mandatory steps 1) Upload dataset 2) Create analysis 3) Create sub analysis 4) DataSharp 5) iRule

In Specialize, for an existing pattern, all its micro insights are found. A specialized pattern for <if age is greater than 21 and income is less than 50 and city is Phil, then LTV is low> can be any pattern with one or more attributes such that there is highest confidence for the resultant pattern.

Works for insights where the insight length is less than 6. To generate a specialized insight, add one attribute-level at any point and compute the metrics. Collect all the newly generated insights and check if the confidence is more and Lift >1.

Arguments

sub_analysis_id Give sub analysis id
rule_id Give rule id

Possible errors

Error message
Invalid sub analysis id
Invalid rule id

POST Request Example

curl -u username:password -X POST {url_prefix}/specialize_rule/{sub_analysis_id}/{rule_id}/

Response Example

{
    "error": false,
    "error_msg": "",
    "result": [
        {
            "actionability": 0.6,
            "confidence": 0.9,
            "explicability": 0.52,
            "hmean": 1.7226,
            "lift": 7.67045,
            "recommended": "No",
            "record_count": "9",
            "rule_string": "if default is no and duration is less than or equal to 185 and pdays is less than or equal to -1 and poutcome is unknown, then y is no",
            "support": 0.012,
            "target_bin": "no"
        }
    ]
}
{
    "error": false,
    "error_msg": "",
    "result": "Could not find better insight with one rule condition for the desired Class"
}