from keras.models import Sequential
from keras.layers import Dense
import numpy
import random

seed = 7
numpy.random.seed(seed)
dataset = numpy.loadtxt("normalized_set.csv", delimiter=",")

x = dataset[:,1:9]
y = dataset[:,9]

model = Sequential()
model.add(Dense(12, input_dim=8, init='uniform', activation='relu'))
model.add(Dense(8, init='uniform', activation='relu'))
model.add(Dense(8, init='uniform', activation='relu'))
model.add(Dense(1, init='uniform', activation='sigmoid'))

model.compile(loss='binary_crossentropy', optimizer='adam', metrics=['accuracy'])
model.fit(x, y, nb_epoch=150, batch_size=15, validation_split=.2)

scores = model.evaluate(x, y)
print("%s: %.2f%%" % (model.metrics_names[1], scores[1]*100))