PredictModelsResource.iLearn(request, sub_analysis_id, **kwargs)

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

This function returns best model for the required criteria. This function splits data into train and test sets and a wide array of models were trained on the training data and whose accuracies were checked on the test dataset. Basing on the error metric, model with best performance is generated. This function returns all models listed below along with their performance as described below.

List of models available in this version: PY.Naive Bayes, PY.Logistic Regression, PY.SGD Classifier, PY.Decision Tree, PY.Random Forest, PY.AdaBoost PY.Xtreme Gradient Boosting, PY.Ensemble Model, R.C50, R.Random Forest, R.Naive Bayes, R.RPart, R.Logistic Regression R.Ensemble Model, R.Gradient Boosting, R.C50 Boosted, R.DeepLearning

As you see, PY prefix is used for algorithms using python machine learning library. R prefix used for R algorithms.

There is a possibility of not successfully running all models. So, system returns all successful models. In the description below, user can assume that the returned models only ran successfully. Most of the times, all models should run successfully.


sub_analysis_id Give sub analysis id
error_importance one of the values from the following list [‘accuracy’, ‘recall’, ‘precision’]

Possible errors

Error message
Invalid sub analysis id
Error_importance is not correct. Please give value from following is[‘accuracy’, ‘recall’, ‘precision’]
Please wait for a while. Predict is running in background
Please run define attributes first

POST Request Example

curl -u username:password -X POST -F "error_importance=recall" {url_prefix}/ilearn/{sub_analysis_id}/

Response Example

    "error": false,
    "error_msg": "",
    "result": [
            "accuracy": 83.71,
            "f1_statistic": 38.44,
            "model_name": "Naive Bayes",
            "precision": 35.75,
            "recall": 41.57,
            "model_no": 1,
            "recommended": "N"
            "accuracy": 89.02,
            "f1_statistic": 35.5,
            "model_name": "Logistic Regression",
            "precision": 63.08,
            "recall": 24.7,
            "model_no": 2,
            "recommended": "N"
            "accuracy": 89.53,
            "f1_statistic": 44.09,
            "model_name": "C50Boosted",
            "precision": 57.14,
            "recall": 35.9,
            "model_no": 3,
            "recommended": "N"
            "accuracy": 100.0,
            "f1_statistic": 100.0,
            "model_name": "DeepLearning",
            "precision": 100.0,
            "recall": 100.0,
            "model_no": 4,
            "recommended": "Y"

Error Response Example

    "error": true,
    "error_msg": "Please wait for a while. Predict is running in background",
    "result": {}