Question: I have table A

lets say it has 2 columns where the values can either be null or a number. I want to select only rows that have at least one of the columns not null:

```
x1   x2
NULL NULL (don't include)
6    NULL (include)
NULL 6    (include)
6    6    (include)

```

Answer: 
Solution
========

So, after a while I found the kaggle link to the *correct* dataset. I was using <https://www.kaggle.com/vfsousas/autos> first, however the same data is also this: <https://www.kaggle.com/orgesleka/used-cars-database> together with 222 kernels to take a look at.
Now looking at <https://www.kaggle.com/themanchanda/neural-network-approach> showed that this guy is also getting "big numbers" for the loss, which was the main part of my confusion (as I so far had only dealt with "smaller numbers" or "accuracies") and made me think again.

Then it got pretty clear to me:

* The dataset was prepared correctly
* The model was working correctly
* I was using the wrong metrics / comparing to other metrics of `sklearn`s `LinearRegression` which were not comparable anyway

In a nutshell:

* An MAE (mean absolute error) around 2000 means, that for a prediction of the car price, in average, it is off/wrong by 2000€ (e.g. correct price was 10.000€ and the model predicts 8.000€ - 12.000)
* The MSE (mean squared error) of course is a much bigger number, which is to be expected, and not "garbage" or wrong model results as I first interpreted
* The "accuracy" metrics are meant for classification, and useless for regression
* The default scoring function of `sklearn`s `LinearRegression` is the r2-score

So I changed the metrics to "mae" and a custom r2-implementation, so I can compare it to the `LinearRegression`.  

It turned out that after around 100 epochs on first try I ended up at a MAE of 1900 and r2-score of 0.69.

Then I calculated the MAE also for the `LinearRegression` for comparison purposes, and it evaluated to 2855.417 (r2-score beeing 0.67).

So in fact the deep learning approach was already better both in regards to the MAE and the r2-score. Thus, nothing was wrong, and I can go on and tune/optimize the model now :)
There are few suggestions from me. 

1. Add the number of neurons in hidden layers.
2. Try not to use `relu` but use `tanh` in your case.
3. Remove `dropout` layers untill your model starting working, then you can add them back & retrain.

```
input_tensor = model_stack = Input(dataset.get_input_shape()) # (303, )
model_stack = Dense(128)(model_stack)
model_stack = Activation("tanh", name = "tanh_1")(model_stack)

model_stack = Dense(64)(model_stack)
model_stack = Activation("tanh", name = "tanh_2")(model_stack)

model_stack = Dense(1, name = "Output")(model_stack)

model = Model(inputs = [input_tensor], outputs = [model_stack])
model.compile(loss = "mse", optimizer = optimizer(lr = learning_rate), metrics = ['mse'])

model.summary()

```