See the implementation of the Viterbi algorithm in Python

Sarcasm

Until I started using social media heavily, I did not know smile emoticon can be sarcastic. I, myself, have used the smile emoticon to express the “fine!” expression many times. I have seen others use them a lot too to express similar expressions. Observations and states are different. What we see or observe, might not give an actual representation of the state. As the quote “an elephant has one teeth to show and other teeth to chew” says, the observations and states might sometimes be in contrast to each other. Sarcasm is real!

Binita and Emojis

Binita is my wife. I have been…


Using pre-trained vectors trained on Google news dataset to find plural words from singular words

Singular to plural conversion

Primary school memory

During my primary school, I encountered singular to plural nouns conversion. My textbook had provided some rules for the conversion. For example, adding ‘s’ to regular nouns to convert to a plural noun, adding ‘es’ if the singular noun ends in ‑s, -ss, -sh, -ch, -x, or -z. Memorization of the rules and a bit of practice made the rules feel natural — the plural form would come naturally while writing.

Photo by fotografierende on Unsplash

Word2Vec

Now, the world is submerged in machine learning and data. New techniques and breakthroughs come all the time, and it is so fun learning about them, especially the mathematics…


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.

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…


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.

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.

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

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…


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…

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