Extract Model Drivers and Weights

Drivers are the list of most important features that contribute the most to predict the outcome. Identifying the most important features help us understand how changing them impacts the predictions.



With Obviously AI API you can get the list of the most important drivers along with their relative weights. All you need is the ID of the Prediction report and your API Key.

Curl and Python Implementation


curl https://api.obviously.ai/user/report/<report_id>
-H 'Authorization: ApiKey <api_key>'


import requests
head = {
  'Authorization' : 'ApiKey <api_key>'
response = requests.get(
  headers = head

Let's say our report id is abcd and the API key is 1234.

In the above code simply replace the api_key with abcd and report_id with 1234.This will return a JSON object containing the following elements:

  1. Drivers

  2. Driver Impact Proportion

  3. Percentage Impact

Let's consider we have already created a Prediction report to predict customer churn using the Telecom Churn Dataset.


Drivers represent those columns/features that were used for prediction in the decreasing order of their importance.

"drivers": [

Driver Impact Proportion

Driver Impact Proportion represents the relative weights of each feature that was used for prediction.In the figure below it can be seen that MonthlyCharges has the highest value of 0.985 and hence it is the most important feature followed by TotalCharges and InternetService.

        "Contract": 0.398,
        "Dependents": 0.597,
        "DeviceProtection": 0.592,
        "InternetService": 0.683,
        "MonthlyCharges": 0.985,
        "MultipleLines": 0.647,
        "OnlineBackup": 0.575,
        "OnlineSecurity": 0.543,
        "PaperlessBilling": 0.681,
        "Partner": 0.63,
        "PaymentMethod": 0.653,
        "PhoneService": 0.467,
        "SeniorCitizen": 0.656,
        "StreamingMovies": 0.635,
        "StreamingTV": 0.619,
        "TechSupport": 0.539,
        "TotalCharges": 0.964,
        "gender": 0.612,
        "tenure": 0.005

Percentage Impact

The Percentage Impact represents the percentage contribution of each feature to predict the outcome. The percentage contribution of Monthly Charges and Total Charges is 30.6% and 26.62%. Hence just these two features are the most important drivers and contribute more than 50% to predict Customer Churn.

        "Contract": "0.67%",
        "Dependents": "2.45%",
        "DeviceProtection": "2.36%",
        "InternetService": "4.27%",
        "MonthlyCharges": "30.6%",
        "MultipleLines": "3.39%",
        "OnlineBackup": "2.12%",
        "OnlineSecurity": "1.72%",
        "PaperlessBilling": "4.22%",
        "Partner": "3.03%",
        "PaymentMethod": "3.52%",
        "PhoneService": "1.05%",
        "SeniorCitizen": "3.59%",
        "StreamingMovies": "3.14%",
        "StreamingTV": "2.82%",
        "TechSupport": "1.67%",
        "TotalCharges": "26.62%",
        "gender": "2.7%",
        "tenure": "0.05%"