Tracciare il grafico di insight del predittore

Introduzione alla Predictive Analytics in Python

Nele Verbiest, Ph.D

Data Scientist @PythonPredictions

Il grafico di insight del predittore

Introduzione alla Predictive Analytics in Python

Tracciare l'incidenza del target

import matplotlib.pyplot as plt
import numpy as np

# Traccia il grafico pig_table["Incidence"].plot()
# Mostra i nomi dei gruppi plt.xticks(np.arange(len(pig_table)), pig_table["income"])
# Centra i nomi dei gruppi width = 0.5 plt.xlim([-width, len(pig_table)-width])
plt.ylabel("Incidence", rotation = 0, rotation_mode="anchor", ha = "right") plt.xlabel("Income") plt.show()

Introduzione alla Predictive Analytics in Python

Tracciare le dimensioni

import matplotlib.pyplot as plt
import numpy as np
# Traccia il grafico

plt.ylabel("Size", rotation = 0,rotation_mode="anchor", ha = "right" )
pig_table["Incidence"].plot(secondary_y = True)
pig_table["Size"].plot(kind='bar', width = 0.5, color = "lightgray", edgecolor = "none") ## Aggiungi barre
# Mostra i nomi dei gruppi plt.xticks(np.arange(len(pig_table)), pig_table["income"]) # Centra i nomi dei gruppi plt.xlim([-0.5, len(pt)-0.5]) plt.ylabel("Incidence", rotation = 0, rotation_mode="anchor", ha = "right" plt.xlabel("Income") plt.show()
Introduzione alla Predictive Analytics in Python

Tracciare le dimensioni

Introduzione alla Predictive Analytics in Python

Esercitiamoci!

Introduzione alla Predictive Analytics in Python

Preparing Video For Download...