application_vnd.jupyter.stderr_output_1.png
from sklearn.cross_validation import train_test_split

from sklearn.preprocessing import Normalizer

from time import time

import pandas as pd

start = time()
train_data = pd.read_csv('train.csv')
test_data = pd.read_csv('test.csv')
trainData = train_data.drop('label', 1)
trainLabel = train_data[['label']]
header = trainData.columns
X_train, X_test, y_train, y_test = train_test_split(trainData, trainLabel, test_size=0.3, random_state=1)
norm = Normalizer().fit(X_train)
X_train = norm.transform(X_train)
X_test = norm.transform(X_test)
testData = norm.transform(test_data)
X_train = pd.DataFrame(X_train, columns=header)
X_test = pd.DataFrame(X_test, columns=header)
testData = pd.DataFrame(testData, columns=header)
y_train = y_train.as_matrix()
y_test = y_test.as_matrix()
end = time()
print('\n***Loading Done: %.2f ***\n' % (end - start))