From the author of the book, Understanding Deep Learning.

<<Chapter 1 Passion

In his memoir, Matthew McConaughey speaks about a moment in his life when he was to tell his father that he wants to switch from law school to acting. He expected his intolerant father to skin him alive.

But his father listened to him, paused, and said in affirmation, “Son, don’t half-ass it!” This stuck with Matthew. And, now he is one of the most prominent actors.

Similarly, if you decided to get in data science, don’t half-ass it. Aspire for excellence!

Excellence. Some adages are dramatic about it. For example, “either aspire for excellence or go…


From the author of the book, Understanding Deep Learning.

Chapter 2 Excellence>>

We have been pumped with the adage of the modern world, “follow your passion.” The questions are,

  • What is passion?
  • How to find one’s passion?

While the adage is clear, the answers to these aren’t. Without the answers, I have seen data scientists pursuing an apparition confused as passion.

Understand Passion

I have heard, “data is my passion.” How could data be your passion? Data is boring!

The problem is passion is often misunderstood. But what is true is that we feel happier if we do things we are passionate about. …


In this article, we will get a starting point to build an initial Neural Network. We will learn the thumb-rules, e.g. the number of hidden layers, number of nodes, activation, etc., and see the implementations in TensorFlow 2.

Photo by Dewang Gupta on Unsplash

Deep Learning provides a wide variety of models. With them, we can build extremely accurate predictive models. However, with the wide variety and a multitude of setting parameters it may be daunting to find a starting point.

In this article, we will find a starting point for building a Neural Network, more specifically a Multilayer Perceptron as an example but most of it is generally applicable.

The idea here is to go over the thumb-rules to build a first neural network model. Tune and optimize this first model if it performs reasonably (minimally acceptable accuracy). …


In continuation of Part I, here we will define and implement custom constraints for building a well-posed Autoencoder. A well-posed Autoencoder is a regularized model that improves the test reconstruction error.

Go to the prequel, Part I.

In Part I, we learned that PCA and Autoencoders share architectural similarities. But despite this, an Autoencoder by itself does not have PCA properties, e.g. orthogonality. We understood that incorporating the PCA properties will bring significant benefits to an Autoencoder, such as resolving vanishing and exploding gradient, and overfitting via regularization.

Based on this, properties that we would like Autoencoders to inherit are,

  1. Tied weights,
  2. Orthogonal weights,
  3. Uncorrelated features, and
  4. Unit Norm.

In this article, we will

  • implement custom layer and constraints to incorporate them.
  • demonstrate how they work, and the improvements in reconstruction…


Here we will learn the desired properties in Autoencoders derived from its similarity with PCA. From that, we will build custom constraints for Autoencoders in Part II for tuning and optimization.

The availability of Deep Learning APIs, such as Keras and TensorFlow, have made model building and experimentation extremely easy. However, a lack of clear understanding of the fundamentals may put us in a directionless race to the best model. Reaching the best model in such a race is left to chance.

Here we will develop an understanding of the fundamental properties required in an Autoencoder. This will provide a well-directed approach for Autoencoder tuning and optimization. In Part I, we will focus on learning the properties and their benefits. …


Due to its ease-of-use, efficiency, and cross-compatibility TensorFlow 2.0 is going to change the landscape of Deep Learning. Here we will learn to install and set it up. We will also implement MNIST classification with TF 2.0.

TensorFlow 2.0 is going to change the landscape of Deep Learning. It has made,

  • model building simpler,
  • production deployment on any platform more robust, and
  • enables powerful experimentation for research.

With these, Deep Learning is going to become more mainstream in various areas in research and industry.

TF 2.0 has Keras API integrated in it. Keras is an extremely popular high-level API for building and training deep learning models. Before going forward it is important to know,

  • TF 1.x also supports Keras, but in 2.0 Keras is integrated tightly with the rest of the TensorFlow platform. 2.0 …


Due to its ease-of-use, efficiency, and cross-compatibility TensorFlow 2 is going to change the landscape of Deep Learning. Here we will learn to install and set it up. We will also implement the MNIST classification with TensorFlow 2.

TensorFlow 2 is going to change the landscape of Deep Learning. It has made,

  • model building simpler,
  • production deployment on any platform more robust, and
  • enables powerful experimentation for research.

With these, Deep Learning is going to become more mainstream in various areas in research and industry.

TensorFlow 2 has Keras API integrated in it. Keras is an extremely popular high-level API for building and training deep learning models. Before going forward it is important to know,

  • TensorFlow 1.x also supports Keras, but in 2.0 Keras is integrated tightly with the rest of the TensorFlow platform. 2.0 …


Here we will break down an LSTM autoencoder network to understand them layer-by-layer. We will go over the input and output flow between the layers, and also, compare the LSTM Autoencoder with a regular LSTM network.

In my previous post, LSTM Autoencoder for Extreme Rare Event Classification [1], we learned how to build an LSTM autoencoder for a multivariate time-series data.

However, LSTMs in Deep Learning is a bit more involved. Understanding the LSTM intermediate layers and its settings is not straightforward. For example, usage of return_sequences argument, and RepeatVector and TimeDistributed layers can be confusing.

LSTM tutorials have well explained the structure and input/output of LSTM cells, e.g. [2, 3]. But despite its peculiarities, little is found that explains the mechanism of LSTM layers working together in a network.

Here we will break down an…


Here we will learn the details of data preparation for LSTM models, and build an LSTM Autoencoder for rare-event classification.

This post is a continuation of my previous post Extreme Rare Event Classification using Autoencoders. In the previous post, we talked about the challenges in an extremely rare event data with less than 1% positively labeled data. We built an Autoencoder Classifier for such processes using the concepts of Anomaly Detection.

However, the data we have is a time series. But earlier we used a Dense layer Autoencoder that does not use the temporal features in the data. Therefore, in this post, we will improve on our approach by building an LSTM Autoencoder.

Here, we will learn:

  • data preparation steps…


Here, we learn the fundamentals behind the Kernel Trick. How it works? How the Kernel Trick does the dot product (or similarity) in infinite dimension without increase in computation?

What is a Kernel Trick? In spite of its profound impact on the Machine Learning world, little is found that explains the fundamentals behind the Kernel Trick. Here we will take a look at it. By the end of this post, we will realize how simple the underlying concept is. And perhaps, this simplicity makes the Kernel Trick profound.

If you’re reading this, you may already know as a fact that if there’s a dot product in a function we can use the Kernel trick. We typically come across this fact when learning about SVM. An SVM’s objective function is,

Chitta Ranjan

Director of Science at ProcessMiner | Book Author | www.understandingdeeplearning.com

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store