January 2020
Beginner to intermediate
372 pages
10h
English
We can go ahead and have a glimpse of the distribution of the newly created features in each of the 20 different news topics present in the dataset, by introducing some simple visualizations. To make histogram plots of the newly created features, after you run all of the steps from the How it works... section of this recipe, follow these commands:
import matplotlib.pyplot as plt
df['target'] = data.target
def plot_features(df, text_var): nb_rows = 5 nb_cols = 4 fig, axs = plt.subplots(nb_rows, nb_cols, figsize=(12, 12)) plt.subplots_adjust(wspace=None, ...
Read now
Unlock full access