text_plain_output_1.png
import matplotlib as mpl

import matplotlib.pyplot as plt

import numpy as np

import pandas as pd

import seaborn as sns

import sklearn as sk

import tensorflow as tf

import xgboost as xgb

X_full = pd.read_csv('../input/30-days-of-ml/train.csv', index_col=0)
X_test_full = pd.read_csv('../input/30-days-of-ml/test.csv', index_col=0)

X_full.isnull().sum()

categorical_features = [cname for cname in X_full.columns if X_full[cname].nunique() <= 15 and X_full[cname].dtype == 'object']
numeric_features = [cname for cname in X_full.columns if X_full[cname].dtype in ['int64', 'float64']]
my_features = categorical_features + numeric_features
numeric_features.remove('target')

## Correlations
correlations = X_full[my_features].corr()
f, ax = plt.subplots(figsize=(12, 12))
sns.heatmap(correlations, square=True, cbar=True, annot=True, vmax=.9);

## Box Plot for Outliers
fig = plt.figure(figsize=(18,6))
sns.boxplot(data=X_full[numeric_features], orient="h", palette="Set2");
plt.xticks(fontsize= 14)
plt.title('Box plot of numerical columns', fontsize=16);

sns.boxplot(data=X_full[['target']], orient='h', palette='Set2')
plt.xticks(fontsize=14)
plt.title('Box plot of target column', fontsize=16)