iAdvise with Predict

iAdvisorResource.iAdvisePredict(request, sub_analysis_id, **kwargs)

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

This function performs rule mapping for each record of the eval data uploaded. iAdvisePredict first performs the prediction using the specified model, then performs the rule mapping and suggestions like iAdvise.

Arguments

sub_analysis_id Give sub analysis id
prediction_id Give prediction id

Possible errors

Error message
Invalid sub analysis id
Invalid prediction id

POST Request Example

curl -u username:password -X POST -F "data_file=@/path/to/eval.csv" {url_prefix}/iadvise_with_predict/{sub_analysis_id}/

GET Request Example

curl -u username:password {url_prefix}/iadvise_with_predict/{sub_analysis_id}/?prediction_id={prediction_id}

Response Example

{
    "error": False,
    "error_msg": "",
    "result": {
        "prediction_id": 466,
        "prediction_data": [
            {
                "Actionability": 1.0,
                "Class": "no",
                "Confidence": 0.88481,
                "Explicability": 1.0,
                "IntuceoRuleId": 1.0,
                "IntuceoRuleScore": 1.1085,
                "Lift": 1.00006,
                "No_Of_Records_Supported": 3933.0,
                "Rule": "default %in%  c("no")",
                "Support": 0.86994,
                "age": 36,
                "balance": 2843,
                "campaign": 1,
                "contact": "cellular",
                "day": 12,
                "default": "no",
                "duration": 473,
                "education": "secondary",
                "housing": "no",
                "job": "blue-collar",
                "loan": "no",
                "marital": "divorced",
                "month": "feb",
                "pdays": 182,
                "poutcome": "success",
                "predictedClass": "no",
                "previous": 1,
                "rule_id": 38328.0,
                "y": "no"
            },
            ...
        ]
    },
}