Let’s understand entropy in layman terms

At first, thank you for your interest in this article. There are a lot of mediums that might have redirected you here — social media sites, medium internal referrals, direct links, emails, google search results, etc. However, since you are redirected, I have an interesting topic of conversation today — entropy.

Image for post
Image for post
Photo by Paul Wong on Unsplash


If the article recommendation is not personalized, you are a random reader to me. Let’s assume there is a 50% chance a random reader will read the whole article. So, the probability of reading this whole article is the same as the probability of not reading this whole article…


Where do most data scientists fail?

There is more to machine learning than selecting the right algorithms and modeling. Most of the machine learning enthusiasts limit the understanding of machine learning process to just the modelling process. Even for early professionals, it might take some time to realize the whole machine learning process in the real world. All thanks to the ubiquitous machine learning tutorials (using highly clean data as the tutorial dataset), the understanding of machine learning process is often limited to cleaning data, modelling the model, and testing the model.

Image for post
Image for post
Photo by Markus Winkler on Unsplash

So, what are the steps where most starters ignore? …

Where does machine learning merit?

Python calculator?

He recommended me to learn Python when he knew I am interested in mathematics and stuff. Back then, I was clueless why he would say that; I was loving my own PHP and HTML/CSS/JavaScript world so didn’t bother to check even what Python does. Once, I had seen one friend play with Python shell, doing mathematical operations, that’s it. I can just do them in my calculator, why need Python, I had wondered.

Image for post
Image for post
Photo by Amol Tyagi on Unsplash

Hello Python

The next time I went to him asking for professional advice — he was already a software engineering professional — he recommended me to learn Python, again

Problem demonstrating scenario involving optimal stopping theory

What did you think of when you had a crush on someone? Did you fantasize about marriage with him/her? When you were in some serious relationship, did you plan marriage with your partner? How did the relationship turn out? Some relationships turn into a marriage, and some don’t. Hearing stories of many friends, I see extremely few people being in a relationship (and later marrying) with only one person whole over their life. So, it is expected that people have experience of some relationships before being finally married to someone for the long term. The decision of marrying someone after…

Modify Step Method of CartPole OpenAI Gym Environment Using Inheritance

In the last blog post, we wrote our first reinforcement learning application — CartPole problem. We used Deep -Q-Network to train the algorithm. As we can see in the blog, the fixed reward of +1 was used for all the stable states and when the CartPole loses its balance, a reward of 0 was given. We saw at the end: when the CartPole approaches 200 steps, it tends to lose balance. We ended the blog suggesting a remark: the maximum number of steps (which we defined 200) and the fixed reward may have led to such behavior. …

TF-Agents to Learn Optimum Policy in CartPole Problem using Deep Q-Network

Reinforcement learning is an emerging sub-field of artificial intelligence that is both cool and effective in some of the applications. Reinforcement learning has been touched in the first few paragraphs of this article and there are hundreds of other introductory blog articles written on the subject. Assuming the reader is familiar with the concept of reinforcement learning, let’s create our first reinforcement learning application using the CartPole problem.

CartPole Problem

Image for post
Image for post
Credit: OpenAI Gym

CartPole problem is the problem of balancing the CartPole. CartPole is the structure where a pole is attached to the cart and the cart is free to slide across the frictionless surface…

An introductory blog on custom TF-Agent environment


Reinforcement learning is an emerging field of AI that has shown a lot of promise in areas like gaming, robotics, manufacturing, and aerospace. After beating human champions in games like Go[1] and Chess[2] in the mid 2010s, reinforcement learning got traction. Google bought DeepMind[3], a highly respected AI startup that contributed to the majority of reinforcement learning breakthroughs in 2010s. Similarly, OpenAI was founded in late 2015 by Elon Musk, Sam Altman, and others[4], who pledged US$1 billion to conduct research in the field of artificial intelligence. OpenAI stated their aim to promote and develop friendly AI in such a…

Disclaimer: No inference is intended to make on the basis of a student’s bench position in a class. The teacher is taken male, as the male teacher’s photo was obtained from Unsplash. No inference about the gender and/or teacher is intended.

A period of the teacher

The teacher is checking everyone’s homework. He is going bench by bench. Students show their homework with a proud smile. The teacher reciprocates the smile with a “thumbs up”. The teacher reaches the last bench. A student, scratching his/her head, said with a worried face, “I forgot to bring my homework today”. The teacher believing him said, “It’s okay…

Covariance and correlation have been the household terms for the people working in the field of statistics, data science, economics, and other quantitative fields. Correlation, which many people have heard more of, is more popular and intuitive than covariance, thanks to its etymology and interpretation friendly mathematical structure. However, correlation itself comes from covariance. Let’s go on our first date with these twins, covariance being the elder one and correlation, the younger.

The First Date

You, my friend who is reading this, and me, are on the same table. A square-shaped four-legged table smiled in awe at the double date we are having…


Given a number of total students in a school and you want to know if all the students fit in an assembly ground, you need to know how many lines need to be formed at a minimum. Given the dimension of a door, you need to know how big plywood can be passed through the door. You can’t do these without one thing — square root. Whether it is finding the square root of a number or square root of a sum of squares, a function (or command) to find the square root of a number is needed.

OK, easy…

Suraj Regmi

Data Scientist, The World Bank — the views and the content here represent my own and not of my employers.

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