Last active
November 13, 2017 21:37
-
-
Save ECHO-ECHOOooo/6bea8cc7aac39e5038f11d263bc5577c to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import pandas as pd | |
import numpy as np | |
import matplotlib.pyplot as plt | |
import matplotlib.image as mpimg | |
import seaborn as sns | |
np.random.seed(2) | |
from sklearn.model_selection import train_test_split | |
from sklearn.metrics import confusion_matrix | |
import itertools | |
from keras.utils.np_utils import to_categorical # convert to one-hot-encoding | |
from keras.models import Sequential | |
from keras.layers import Dense, Dropout, Flatten, Conv2D, MaxPool2D | |
from keras.optimizers import RMSprop | |
from keras.preprocessing.image import ImageDataGenerator | |
from keras.callbacks import ReduceLROnPlateau | |
sns.set(style='white', context='notebook', palette='deep') | |
# Load the data | |
train = pd.read_csv("data/train.csv") | |
test = pd.read_csv("data/test.csv") | |
Y_train = train["label"] | |
# Drop 'label' column | |
X_train = train.drop(labels = ["label"],axis = 1) | |
# free some space | |
del train | |
g = sns.countplot(Y_train) | |
print(Y_train.value_counts()) | |
print() | |
print("Checking for missing values in the training set:") | |
print(X_train.isnull().any().describe()) | |
print() | |
print("and, in the test set:") | |
print(test.isnull().any().describe()) | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment