Last active
June 9, 2021 09:25
-
-
Save ParthNipunDave/527c891e51784f5041d271d993c5e0df to your computer and use it in GitHub Desktop.
This file contains hidden or 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
model=Sequential() | |
model.add(Dense(64,input_dim=train_x.shape[1])) | |
model.add(Dense(64)) | |
model.add(Dense(64)) | |
model.add(Dense(64)) | |
model.add(Dense(64,)) | |
model.add(Dense(1,activation='sigmoid')) | |
model.compile(loss='binary_crossentropy',optimizer='adam',metrics=['acc']) | |
model.summary() | |
his=model.fit(train_x,train_y,epochs=50,batch_size=1,verbose=1) | |
predict=model.predict(test_x) | |
def predictions(predict): | |
for i in predict: | |
if i>0.5: | |
return 1 | |
else: | |
return 0 | |
predictions=list(map(predictions,predict)) | |
print('Recall Score --> ',recall_score(test_y,predictions)) | |
print("Classification Report\n",classification_report(test_y,predictions)) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment