한방에 99.9% 정확도, 오차<1% 나올리가 있나?
accuracy의 변동성이 있긴해도 99.9%...
좋아할 게 아니라, 상당히 의심스러운데
뭘 잘 못했는지 고민해봐야...
missing-data 를 너무 평균값으로 넣었나?
코드내용:
[0,1] 분류
>>> X_train, X_test, y_train, y_test = train_test_split(X, y, test_size=0.3, random_state=0)
>>> X_train.shape
(48456, 13)
>>> y_train.shape
(48456,)
>>> X_test.shape
(20767, 13)
>>> y_test.shape
(20767,)
>>> classifier.add(Dense(units = 13, activation = 'relu'))
>>> classifier.add(Dense(units = 1, activation = 'sigmoid'))
>>> classifier.compile(optimizer = 'adam', loss = 'binary_crossentropy', metrics = ['accuracy'])
>>> classifier.fit(X_train, y_train, batch_size=batch_size, epochs=epochs, validation_data=(X_test, y_test))
결과:
>>> print("Best Accuracy on training set = ", max(history.history['accuracy'])*100)
Best Accuracy on training set = 99.94015097618103
>>> print("Best Accuracy on test set = ", max(history.history['val_accuracy'])*100)
Best Accuracy on test set = 99.99518394470215
>>> print("Loss on training set = ", max(history.history['loss']))
Loss on training set = 0.3780692219734192
>>> print("Loss on test set = ", max(history.history['val_loss']))
Loss on test set = 0.018711965531110764