PatternsResource.actRule(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 actRule, a Pattern with an undesired class can be explored to find the change required to make the pattern a desired class. This is useful if there is population with undesired behaviour, one can find the ways to make them behave like desired.


sub_analysis_id Give sub analysis id
rule_id Give rule id
desired_class Give desired class

Possible errors

Error message
Invalid sub analysis id
Invalid rule id

POST Request Example

curl -u username:password -X POST {url_prefix}/act_rule/{sub_analysis_id}/{rule_id}/?desired_class=yes

Response Example

    "error": false,
    "error_msg": "",
    "result": [
            "actionability": 1.0,
            "confidence": 0.44762,
            "explicability": 1.0,
            "hmean": 0.8491,
            "lift": 2.38095,
            "recommended": "No",
            "record_count": "141",
            "rule_string": "If month is jun, then y = yes",
            "support": 0.188,
            "target_bin": "yes"
    "error": false,
    "error_msg": "",
    "result": "Could not find better insight with one rule condition for the desired Class"