I ran deep learning for regression, it is a multi-modal model with two loss functions. I normalize my label, so the range is 0-1, I think the MSE and MAE are acceptable, but the R2 is horrible. The R2 started from a negative number, but now it is positive, but still very low.
How can I improve it? What should I check?
This is my code.
def r_squared(y_true, y_pred):
SS_res = K.sum(K.square(y_true - y_pred))
SS_tot = K.sum(K.square(y_true - K.mean(y_true)))
return 1 - SS_res/(SS_tot + K.epsilon())
optimizer1 = keras.optimizers.Adam(1e-5, clipnorm=0.3, epsilon=1e-4)
model.compile(optimizer=optimizer1, loss=losses1, loss_weights=loss_weights1, metrics=['mse',r_squared,'mae'])