text_plain_output_1.png
from keras.layers import Dense

from keras.layers import Dropout

from keras.models import Sequential

from sklearn.metrics import confusion_matrix

import numpy as np # linear algebra

import pandas as pd # data processing, CSV file I/O (e.g. pd.read_csv)

data = pd.read_csv('../input/creditcard.csv')

np.array(x_train)

x_train = np.array(x_train)
x_test = np.array(x_test)
y_train = np.array(y_train)
y_test = np.array(y_test)

model = Sequential([Dense(units=16, input_dim=29, activation='relu'), Dense(units=24, activation='relu'), Dropout(0.5), Dense(20, activation='relu'), Dense(24, activation='relu'), Dense(1, activation='sigmoid')])
model.summary()

model.compile(optimizer='adam', loss='binary_crossentropy', metrics=['accuracy'])
model.fit(x_train, y_train, batch_size=15, epochs=5)

score = model.evaluate(x_test, y_test)

y_pred = model.predict(x_test)
y_pred.shape

y_test.shape

y_test = pd.DataFrame(y_test)

cnf_matrix = confusion_matrix(y_test, y_pred.round())
print(cnf_matrix)