Create Analysis¶
AnalysisResource.
createAnalysis
(request, dataset_id, **kwargs)¶Prior mandatory steps 1) Upload dataset
Create analysis
Arguments
dataset_id Give uploaded dataset id name Name of your choice to be displayed for analysis target_attr Give target name desired_class_name give desired class value (ex. ‘yes’ or ‘no’ or None) target_range if target is numeric, then provide data like {‘level1’: {‘from_value’: ‘’, ‘to_value’: 1}, ‘level2’: {‘from_value’: 1, ‘to_value’: ‘’}} goal Explain what you would like to understand from the analysis. description Describe the actionable business benefit(s) you would like to achieve. assumptions Share important assumptions you are making about the context or situation. process Explain the analytical approach, tool(s), or framework(s) you are currently using. Possible errors
Error message Invalid dataset id Analysis name already exists. Please give another name Invalid analysis name. Only alphanumeric and underscore are allowed Invalid target name. It does not exist in the data file Desired_class_name is not correct. Please give value from following list <bin_list> Invalid target range. Unable to parse Target range not applicable for categorical target Created target levels have reached the system limit <Value> This sub analysis has been locked. You cannot perform this task POST Request Example
curl -u username:password -X POST -F "name=bank" -F "target_attr=y" -F "desired_class_name=yes" -F "goal=" -F "description=" -F "assumptions=" -F "process=" {url_prefix}/analysis/{dataset_id}/ curl -u username:password -X POST -F "name=bank" -F "target_attr=age" -F "desired_class_name=level1" -F "target_range={'level1': {'from_value': '', 'to_value': 1}, 'level2': {'from_value': 1, 'to_value': ''}}" -F "goal=" -F "description=" -F "assumptions=" -F "process=" {url_prefix}/analysis/{dataset_id}/Response Example
{ "error": false, "error_msg": "", "result": { "analysis": { "dataset_name": "bank_small", "id": 1200, "name": "bank", "sub_analysis": { "desired_class": "yes", "id": 1201, "name": "bank analysis", "target_attribute": "y", "target_level_name": [ "no", "yes" ], "target_variable_type": "categorical" } } } }Error Example
{ "error": true, "error_msg": "some error message", "result": {}, }