I have a basic sequential neural network built with TensorFlow.
model = tf.keras.Sequential([ Dense(16, activation='relu', input_shape=(X_train.shape,), kernel_regularizer=l1_l2(0.001, 0.001)), Dropout(0.3), BatchNormalization(), Dense(64, activation='relu', kernel_regularizer=l1_l2(0.001, 0.001)), Dropout(0.3), BatchNormalization(), Dense(64, activation='relu'), Dense(1, activation='sigmoid') ]) model.compile(optimizer='rmsprop', loss='binary_crossentropy', metrics=['binary_accuracy', 'AUC'])
I train on 12,000 samples with are split evenly. 6000 are category == 1 and 6000 are category == 0. Currently my network treats each category equally. It is equally likely to correctly/wrongly categorise both categories (about 92% and 93% accuracy). However, in my application I need category 1 to be correctly identified >99% of the time. category 0 accuracy can be reduced as low as 84% to achieve this.
How could I go about doing this?