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

Entropy

If you are a random reader…

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. You might read or you might not. Suppose there is some perfect predictive engine which gives me information if some user will read this article. So, the engine says whether you will read this article. It provides me with information in any format — text, audio, image, etc. …


Opinion

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. Now, having been graduated and unemployed, I didn’t have much room to wander here and there, so I took his advice seriously, just as how he said. Thanks to his advice and guidance all over the years, I was able to switch completely to Python doing web development in Django, machine learning in Sklearn, data preprocessing in Pandas, deep learning in TensorFlow, and GUI programming in tkinter. …


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 a relationship is a binary choice. You either decide to marry or reject to marry. You can’t just keep someone as an option, and explore other partners. Everyone wants the “best” spouse for them, but you can’t really experiment with many spouses in life to find the best one. Time and tide wait for no man. You are more likely to find a fitting partner at some age range than others. So, I would constrain this problem by the number of relationships you can be with all over your life. A man, if never wants to marry, might stay in twenty relationships all over his life on an average. Twenty is just a guess here. …


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

Backdrop

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 way as to benefit humanity as a whole. OpenAI Five, a project of OpenAI, demonstrated the ability to achieve expert-level performance, learn human-AI cooperation, and operate at internet scale on Dota 2 game[5]. …


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. We are having date with covariance and correlation. You, a big fan of the game Call break, purposed us to play call break there. I, an ardent fan of call break echoed your proposal, before the voice could die out. We played a few rounds of games; enthusiastic waits for cards to be fully distributed, brave calls to make the game more competitive, and cute attempts to bring luck to one’s side, the game was filled with fun, excitement, nervousness, and energy. …


Situations

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.

Easy?

OK, easy. We have built-in functions (or commands/buttons) in our calculators, computers, programming languages, mobiles and everywhere to calculate the square root. Yes, that can be done in a straight forward way. But what if you are in a place where electricity is not available and your gadgets are dead? …

About

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