What to do when the labels are skewed: tackling the Accuracy Paradox

A rookie can get caught when label values aren’t balanced
  • 0 label — TTR ≤ 1 day: 39%
  • 1 label — TTR > 1 day: 61%
Including MI:5 — The Accuracy Paradox
zero_weight = 1.0
one_weight = 72.8
model.compile(loss="binary_crossentropy", optimizer=optimizer, metrics=["accuracy"], weighted_metrics=["accuracy"])
modelfit = model.fit(X_train, dtrain.target, epochs=epochs, batch_size=BATCH_SIZE
, validation_data=(X_valid, dvalid.target),class_weight = {0 : zero_weight, 1: one_weight}, verbose=1)

--

--

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store