I am having a problem with this NN regression model in keras. I am working on a cars dataset to predict the price based on 13 dimensions. In short, I have read it as pandas data
First of all, you should consider clean your code when posting questions in stackoverflow. I've tried to replicate your code and found some errors before getting your dataset clean at numpy arrays train_data
, train_targets
, test_data
and test_targets
.
Focusing on machine learning theory, if you don't shuffle your dataset, it is going to be really harder for you regression model to get trained. Try shuffling your dataset using random.shuffle()
before splitting train and test subsets.
As stated by Matias answer, if you are working on a regression problem (instead of a classification one) it makes no sense to use the accuracy metric.
Furthermore, binary crossentropy loss is only suitable for classification too, so it neither makes sense. Typical loss used for regression models is Mean Square Error. Consider changing you keras model compiling by:
model.compile(loss='mean_squared_error', optimizer='adam')
Hope this helps!
Accuracy is a classification metric, it makes no sense to use it for regression. There is no actual problem.