How to interpret a regression model performances (Loss, accuracy) under keras

Data Science Asked by asendjasni on November 28, 2020

I built a regression model using Keras. The following parms were used:

model.compile(loss=custom_mse, optimizer=RMSprop(0.0001), metrics=mae)
history =, y=y_train, validation_data=(x_valid, y_valid), epochs=100, batch_size=16, verbose=2)

And here the funcs for the loss and accuracy:

import tensorflow.keras.backend as K

def custom_mse(y_true, y_pred):
    loss = K.square(y_pred - y_true)  
    return K.sum(loss, axis=1)        

def mae(y_true, y_pred):
    eval = K.abs(y_pred - y_true)
    return K.mean(eval, axis=-1)

I’m quite new with CNN and regression models. I couldn’t interpret the loss and accuracy.

The performances’ history is depicted in the following figures.

enter image description here

From the above plot, is the model overfitting or its doing alright? And what is all those spades mean?

Add your own answers!

Ask a Question

Get help from others!

© 2024 All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP