Skip to content

asaldelkhosh/Pima-Indians

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

25 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation


Implementing a keras model for diabetes recognition, using Pima Indians dataset.

Model

Here is the model that we use to recognize diabetes, we create a sequential model with 3 hidden layers:

# define the keras model
model = Sequential()
model.add(Dense(12, input_shape=(8,), activation='relu'))
model.add(Dense(8, activation='relu'))
model.add(Dense(1, activation='sigmoid'))

Fit

EPOCHS = 150
BATCH_SIZE = 10
# fit the keras model on the dataset
model.fit(X, y, epochs=EPOCHS, batch_size=BATCH_SIZE)