# Predict Classification Outputs

{% embed url="<https://www.youtube.com/watch?index=8&list=PLXuq6Zoc_S9kbt99e51MstBwvEUpfOD0s&v=X7qdSgstAW4>" %}

Once you've followed the steps in [Predict Classification](https://docs.shimoku.com/dev/artificial-intelligence/classification/predict-classification), you're ready to explore its outputs.

The dictionary output\_dict will have 2 items in which the keys are the names of the outputs and the value are pandas data frames. Let's look at each one of them.

### **Predictions + Local Explainability**

#### **df\_predicted.csv: Data frame containing predictions for the data used as input.**

<figure><img src="https://3782181538-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FUlHTfmIZY46Z1EDfyGMz%2Fuploads%2FZQQfNN922Xbe8OsI9sZ7%2Fimage.png?alt=media&#x26;token=204a7d53-691e-4283-8159-4206bf9e2a2a" alt=""><figcaption></figcaption></figure>

**How to read the data above:**

* Customer UP24795 has 17.2% probability of churning (class True) and 82.8% probability of not churning (class False). Therefore, the prediction of churn is False.&#x20;
* Customer GT32586 has 85.4% probability of churning (class True) and 14.6% probability of not churning (class False). Therefore, the prediction of churn is True.&#x20;

#### **df\_db.csv: Dataframe containing drivers and barriers per prediction.**

<figure><img src="https://3782181538-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FUlHTfmIZY46Z1EDfyGMz%2Fuploads%2FIIBXoeYvjDrWsFslb1SS%2Fimage.png?alt=media&#x26;token=28452bfc-fc6d-428a-8d53-cd419f656cde" alt=""><figcaption></figcaption></figure>

This will help you understand the impact that each variable has on the predictions we just saw above. Let us take again customer UP24795 as an example. We'll look at class True to explain the probability of 17.2% of churning. This probability comes from (base value + drivers + barriers). That is, the base value is the probability that any customer in the dataset has to churn. But each customer is different, they have each a combination of Income, Monthly Premium Auto, Number of Policies, etc. so we have to sum their drivers and barriers to the base value to get the final probability.

For customer BU79786 we see that Income (15.4%) and Monthly Premium Auto (6.8%)  are the top two drivers that lead this specific customer not to churn, while their Number of policies (3.4%) and Vehicle class (1%) are the top two barriers.&#x20;

Both the drivers and barriers are ordered from most to least impact in columns `list_driver_names` and `list_barrier_names`. In `list_driver_values` and `list_barrier_values` you can see how much impact they have in terms of percentage.

{% hint style="info" %}
You can use the [Generate Insights](https://docs.shimoku.com/dev/artificial-intelligence/generate-insights) AI function to create text insights for **df\_db.csv**.
{% endhint %}
