In [1]:
%load_ext watermark
%watermark -v -n -m -p numpy,scipy,sklearn,pandas
%load_ext autoreload
%autoreload 1


Mon May 29 2017 

CPython 3.5.3
IPython 6.0.0

numpy 1.12.1
scipy 0.19.0
sklearn 0.18.1
pandas 0.20.1

compiler   : MSC v.1900 64 bit (AMD64)
system     : Windows
release    : 7
machine    : AMD64
processor  : Intel64 Family 6 Model 69 Stepping 1, GenuineIntel
CPU cores  : 4
interpreter: 64bit

In [2]:
%matplotlib inline
import pandas as pd
import numpy as np
import seaborn as sns
import os
PROJ_ROOT = os.path.abspath(os.path.join(os.pardir))
print(PROJ_ROOT)


c:\code\overcome-the-chaos

In [3]:
import sys
sys.path.append(os.path.join(PROJ_ROOT, 'src'))
%aimport data.preprocess
%aimport visualization.exploratory
from data.preprocess import read_raw_data, preprocess_data
from visualization.exploratory import exploratory_visualization


C:\Users\bednarsm\AppData\Local\Continuum\Anaconda3\envs\chaos\lib\site-packages\matplotlib\__init__.py:1405: UserWarning: 
This call to matplotlib.use() has no effect because the backend has already
been chosen; matplotlib.use() must be called *before* pylab, matplotlib.pyplot,
or matplotlib.backends is imported for the first time.

  warnings.warn(_use_error_msg)

In [4]:
data_fname = os.path.join(PROJ_ROOT, 'data', 'raw', 'iris.csv')
raw_data = read_raw_data(data_fname)
raw_data.head()


Out[4]:
0 1 2 3 4
0 5.1 3.5 1.4 0.2 Iris-setosa
1 4.9 3.0 1.4 0.2 Iris-setosa
2 4.7 3.2 1.3 0.2 Iris-setosa
3 4.6 3.1 1.5 0.2 Iris-setosa
4 5.0 3.6 1.4 0.2 Iris-setosa

In [5]:
preprocessed_data = preprocess_data(raw_data)
preprocessed_data.head()


Out[5]:
x0 x1 x2 x3 y
0 5.1 3.5 1.4 0.2 Iris-setosa
1 4.9 3.0 1.4 0.2 Iris-setosa
2 4.7 3.2 1.3 0.2 Iris-setosa
3 4.6 3.1 1.5 0.2 Iris-setosa
4 5.0 3.6 1.4 0.2 Iris-setosa

In [8]:
exploratory_visualization(preprocessed_data)


C:\Users\bednarsm\AppData\Local\Continuum\Anaconda3\envs\chaos\lib\site-packages\matplotlib\__init__.py:1405: UserWarning: 
This call to matplotlib.use() has no effect because the backend has already
been chosen; matplotlib.use() must be called *before* pylab, matplotlib.pyplot,
or matplotlib.backends is imported for the first time.

  warnings.warn(_use_error_msg)
Out[8]:
<seaborn.axisgrid.PairGrid at 0xe189668>

In [ ]:


In [ ]: