Get Target Bins

DataDefinitionResource.getTargetBins(request, sub_analysis_id, **kwargs)

Prior mandatory steps 1) Uplaod dataset 2) Create analysis 3) Create sub analysis

This function can be used to obtain the information about the target attribute like: 1. Target attribute name 2. Target type: Numeric or categorical 3. Desired_class level 4. Error_importance : (Accuracy/Precision/Recall) 5. Target bins or levels: For numeric, it returns the bin ranges. For categorical, it returns the all unique levels


sub_analysis_id Give sub analysis id

Possible errors

Error message
Invalid sub analysis id
Target ranges are not yet defined

GET Request Example

curl -u username:password {url_prefix}/target_bins/{sub_analysis_id}/

Response Example

    "error": false,
    "error_msg": "",
    "result": {
        "desired_class": "bin1",
        "error_importance": "accuracy",
        "target_attribute": "age",
        "target_bin_name": [
        "target_variable_type": "categorical"