Using Deep Neural Networks for regression problems might seem like overkill (and quite often is), but for some cases where you have a significant amount of high dimensional data they can outperform any other ML models.

When you learn about Neural Networks you usually start with some image classification problem like the MNIST dataset — this is an obvious choice as advanced tasks with high dimensional data is where DNNs really thrive.

Surprisingly, when you try to apply what you learned on MNIST on a regression tasks you might struggle for a while before your super-advanced DNN model is any better than a basic Random Forest Regressor. Sometimes you might never reach that moment…

In this guide, I listed some key tips and tricks learned while using DNN for regression problems. The data is a set of nearly 50 features describing 25k properties in Warsaw. I described the feature selection process in my previous article: feature-selection-and-error-analysis-while-working-with-spatial-data so now we will focus on creating the best possible model predicting property price per m2 using the selected features.

The code and data source used for this article can be found on GitHub.

1. Getting started

When training a Deep Neural Network I usually follow these key steps:

  • A) Choose a default architecture — no. of layers, no. of neurons, activation
  • B) Regularize model
  • C) Adjust network architecture
  • D) Adjust the learning rate and no. of epochs
  • E) Extract optimal model using CallBacks

Usually creating the final model takes a few runs through all of these steps but an important thing to remember is: DO ONE THING AT A TIME. Don’t try to change architecture, regularization, and learning rate at the same time as you will not know what really worked and probably spend hours going in circles.

#deep-learning #regression #tensorflow #machine-learning #neural-networks #deep learning

Training Neural Networks for price prediction with TensorFlow
2.80 GEEK