When not to use Neural Networks

Rahul Bhatia
Dec 18, 2018 · 5 min read
Image result for neural network

Okay folks, so we all know the deal that neural networks are great, they can be really cool and have given the state-of-the-art performance in the past few years at many tasks and have been quite promising for many of the tasks involved in Deep Learning, and are the main driving force behind Deep Learning.

But have you ever wondered why do they work so well most of the times and when you should avoid using them? As a good Data Scientists/Machine Learning Engineer, you should be well aware of the arsenal you possess and when you should use which weapon to ensure the maximum result.

So there are 3 main reasons behind so much hype built on Neural Networks in recent times — Data, Algorithms(thanks to Hinton’s backpropagation, used by almost every Neural Network)and Computational Power.

The more data you feed a neural network, the better it gets with time.

The amount of Computational power doubles every 2 years, with so many companies producing much powerful hardware these days, it becomes a lot simpler to process so much data collected over the past few years. Nvidia is the market leader when it comes to GPUs and now Google has come into this space as well, releasing TPUs(specialized ASICs for Deep Learning) in recent times, making it easier to train Deep Neural networks, requiring so much computational power.

Also, talking about the algorithms, Backpropagation has been the main driving force behind the awesomeness that these Neural Networks have given us and it is not a new thing and has been around since a long time, is famous recently only because of so much data and Computational power.

The main advantage of Neural Network lies in their ability to outperform nearly every traditional Machine Learning algorithms, but just like everything else, they too have their disadvantages.

You will most probably use a Neural network when you have so much data with you(and computational power of course), and accuracy matters the most to you. For Example, Cancer Detection. You cannot mess around with accuracy here if you want this to be used in actual medical applications.

So, let me start discussing the disadvantages of Neural Networks one by one :

1. Hard to interpret most of the times

Most of the times a neural network will give you good results if you are using it for the right problem, but if it doesn’t perform well, you will have a lot of trouble finding why it didn’t go as expected, especially a Deep Neural network(which will be the case most of the times). For example, if you were trying to predict the type of cancer and you expected the output to be Malignant, but instead you got Benign, it would be quite hard to figure out why the neural network gave such an input, instead a traditional ML algorithm such as a Decision Tree, will be much more easy to interpret.

Example: Banks generally will not use Neural Networks to predict whether a person is creditworthy because they need to explain to their customers why they denied them a loan.

Long story short, when you need to provide an explanation to why something happened, Neural networks might not be your best bet. You simply cannot take a decision just because your computer said so.

2. They require too much data

I bet you saw this coming,didn’t you :P

Of course, you saw this coming! Neural Networks require much more data than traditional Machine Learning algorithms to do their job well. Most of the times you will find yourself struggling with a Neural Network if you have too little data or you don’t have much data, which you won’t have sometimes. For Example, a Naive Bayes would deal really well when you are having less data.

3. They take time to be developed

I know the deal folks, some of you might be thinking what am I talking about. I know it’s highly easy to prototype a Neural Network model in minutes using high-level APIs such as Keras, but that is not always the case(in fact it’s never the case working on a big project). Keras is really good for quick prototyping but has its own disadvantages. You will not find it a good contender when you need a lot of customizations and that’s where Tensorflow comes to your rescue, providing you with much better options to customize stuff as per your needs, so you really wanna consider thinking once again if building a customized neural network model(to suit the problem well) is worth the effort or you can get around with a traditional ML algorithm.

4. They take a lot of time in the training phase

I bet you have seen such memes xD

We all know that a neural network will take much longer to train rather than a traditional ML algorithm, and we don’t always have the computational power and even if we do, sometimes, we just don’t have the time to wait so long and to decide whether the end result will be worth the wait or not. Although it really depends on the architecture of your neural network(usually how deep it is) and the size of your data but still in most cases, it will take some serious time to train it.

Summing it up, you know that Neural networks can outperform almost every traditional ML algorithm out there, but yes, they come with their own cons as well so next time you need to solve an ML problem, choose your algorithm wisely and with a sense of ‘you know what you are doing’. Hopefully, this article helped you and increased your existing ML knowledge. If it did, I would appreciate if you could give this as many claps as you can, and you can follow me on Medium and Twitter to stay updated of everything I write about Machine Learning and Web Development. Thanks for reading, have a great Christmas and a great new year ahead!

Data Driven Investor

from confusion to clarity, not insanity

Rahul Bhatia

Written by

Data Scientist | Aspiring Quant | Full Stack Developer

Data Driven Investor

from confusion to clarity, not insanity

Welcome to a place where words matter. On Medium, smart voices and original ideas take center stage - with no ads in sight. Watch
Follow all the topics you care about, and we’ll deliver the best stories for you to your homepage and inbox. Explore
Get unlimited access to the best stories on Medium — and support writers while you’re at it. Just $5/month. Upgrade