Skip to main content
Typo
Source Link
Simon Larsson
  • 4.3k
  • 1
  • 16
  • 30

YouEverything is fine, loss is going down, your model is learning. The problem is that you are using accuracy on a regression problem. 

Accuracy should only be used for classification. It is a very common mistake to make when starting out. If you want another metric then I you could use mean_absolute_error which, as the name suggest, tells you how large error your model makes on average.

The reason accuracy does not work is because it only works with exact matches where you have y_true == y_pred. In regression you are working with continuous values which makes this quite rare and will not have much to do with the performance of your model.

The reason you get any accuracy at all is likely because Keras does y_true == round(y_pred), rounding the model prediction. Otherwise accuracy would almost always be zero since the model will never get the same decimals. This question has a good answer by Esmailian that goes a bit more into details on this.

You are using accuracy on a regression problem. Accuracy should only be used for classification. It is a very common mistake to make when starting out. If you want another metric then I you could use mean_absolute_error which, as the name suggest, tells you how large error your model makes on average.

Everything is fine, loss is going down, your model is learning. The problem is that you are using accuracy on a regression problem. 

Accuracy should only be used for classification. It is a very common mistake to make when starting out. If you want another metric then you could use mean_absolute_error which, as the name suggest, tells you how large error your model makes on average.

The reason accuracy does not work is because it only works with exact matches where you have y_true == y_pred. In regression you are working with continuous values which makes this quite rare and will not have much to do with the performance of your model.

The reason you get any accuracy at all is likely because Keras does y_true == round(y_pred), rounding the model prediction. Otherwise accuracy would almost always be zero since the model will never get the same decimals. This question has a good answer by Esmailian that goes a bit more into details on this.

Source Link
Simon Larsson
  • 4.3k
  • 1
  • 16
  • 30

You are using accuracy on a regression problem. Accuracy should only be used for classification. It is a very common mistake to make when starting out. If you want another metric then I you could use mean_absolute_error which, as the name suggest, tells you how large error your model makes on average.