0
$\begingroup$

I'm using a TensorFlow model that look likes this:

model = keras.models.Sequential()


model.add(Conv1D(128, kernel_size=5, strides=2, activation='relu', input_shape=(785, 2),kernel_regularizer=regularizers.l2(0.05)))
model.add(BatchNormalization())
model.add(MaxPooling1D(2))

model.add(Conv1D(128, kernel_size=5, strides=2, activation='relu', input_shape=(785, 2),kernel_regularizer=regularizers.l2(0.05)))
model.add(BatchNormalization())
model.add(MaxPooling1D(2))

model.add(Conv1D(64, kernel_size=3, strides=2, activation='relu',kernel_regularizer=regularizers.l2(0.05))) 
model.add(BatchNormalization())
model.add(MaxPooling1D(2))

model.add(Conv1D(32,kernel_size=2,strides=2,activation='relu',kernel_regularizer=regularizers.l2(0.05)))      
model.add(BatchNormalization())
model.add(MaxPooling1D(2))

model.add(Dropout(0.4))

model.add(Flatten())
model.add(Dense(128, activation='relu',kernel_regularizer=regularizers.l2(0.05)))

model.add(Dense(64, activation='relu',kernel_regularizer=regularizers.l2(0.05)))

model.add(Dropout(0.75))
model.add(Dense(4, activation='sigmoid'))#Final Layer using Sigmoid

These are the following metrics when calculate on the validation dataset and on the testing data:

F1 Score on Validation set: 0.8215512349550518

Recall score on Validation set: 0.7900965073529411

Precision score on Validation set: 0.8556143079315708

F1 Score on Testing set: 0.5124312694238586

Recall score on Testing set: 0.4925321691176471

Precision score on Testing set: 0.5340059790732437 I use micro-averaging to calculate these scores.

My model outputs 4 values, each representing a probability. Also, the testing accuracy is still relatively high at 81.5%, which is similar to the accuracy of the model on the validation dataset. Why do my evaluation metrics differ so much?

$\endgroup$

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.