Some kind of plots

Distribution (Histogram)

import matplotlib.pyplot as plt
df.hist(bins=50, figsize=(20, 15))
plt.show()

Distribution (Density)

A density plot is a smoothed, continuous version of a histogram estimated from the data.

df.plot(kind='density', subplots=True, layout=(8,8), sharex=False, legend=False, figsize = (12,12))
plt.show()

Correlations

corr = train_df.corr()
corr

Heatmap (needs correlations)

%matplotlib inline
import seaborn as sns
plt.figure(figsize = (16,8))
sns.heatmap(corr, annot = True)

Pairplot
sns.pairplot(train_df)

Histogram plot of select variable(s)

from matplotlib import pyplot
pyplot.subplot(211)
pyplot.hist(train_X.iloc[:, 1])
pyplot.subplot(212)
pyplot.hist(train_X.iloc[:, 2])

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.