The Algorithm

What I start with and where I end up.

  • Peaceful Music
  • 10 Hours of Airplane White Noise
  • Sound of a River Flowing
  • High Pressure Water Jet Cleaning
  • Inside of a Cooling Tower
  • How to Build a Nuclear Reactor at Home
  • Countries with Nuclear Weapons
  • Top 10 Powerful Armies in the World
  • Top 10 Battle Tanks
  • How to Wash Main Battle Tanks

Thank you Algorithm. Now, I can wash Battle Tanks.

– Pradeep

Let’s Scrape

With all the buzz around machine learning, I find new job titles popping up everyday. I’m curious to know how this has affected the job landscape – what new jobs it has created, and what existing jobs require machine learning as an additional skill.

Let’s scrape a job portal to understand.

To keep it simple, I’m scraping a single website with jobs containing the keyword “Machine Learning” in nine big cities of Germany – Berlin, Frankfurt-Mainz, Hamburg, Munich, Stuttgart, Cologne, Dresden, Hanover, Dusseldorf.

I have summarized the results in word clouds comprised of cities, job positions, and major companies involved in machine learning. 


This slideshow requires JavaScript.

– Pradeep

Show Me The Output

Show me the output of a perfect code
So many lines for the broken code
It’s hard to see in a dark background
So hard to read
Debug with me
Nights of coffee so soon become
Empty and dry I could feel the cooling fan
Your every line will be debugged
They tell me

Show me the output of a perfect code
Is this the program I need to walk with?
Tell me why I can’t see
There’s something missing in my code

Lines go on as they never end
Eyes of hawk observe the trends
They never say forever gaze upon me
Guilty roads to an endless debugging
There’s no control
Are you with me now?
Your every line will be debugged
They tell me

Show me the output of a perfect code
Is this the program I need to walk with?
Tell me why I can’t see
There’s something missing in my code

There’s no one to seek help
I have no place to go
Surrender my heart, body, and soul to stack overflow
How can it be
You’re asking me
To feel the things you never show

You are missing in my code
Tell me why I can’t see

Show me the output of a perfect code
Is this the program I need to walk with?
Tell me why I can’t see
There’s something missing in my code

Show me the output of a perfect code
Is this the program I need to walk with?
Tell me why I can’t see
There’s something missing in my code

– Pradeep


Source  :

Original Song : ‘Show Me the Meaning of Being Lonely’ by Backstreet Boys

Life and Reinforcement Learning

This article explores the closeness of life, and reinforcement learning, a popular machine learning branch. Although reinforcement learning has grown by drawing concepts, and terminologies from life and neuroscience, I think it’s good to compare reinforcement learning algorithms and life, from which they are derived.

Reinforcement learning is a subset of machine learning which deals with an agent interacting in an environment and learning based on rewards and punishments from the environment. This falls under the broader umbrella of artificial intelligence.

After a group of researchers realized the potential of reward-based learning, a resurgence happened in the late 1990s. Thus, after a number of failed approaches over decades, this interaction and reward-based learning approach seems promising to achieve our dream of artificial general intelligence.

For those who are unfamiliar, this idea is similar to how babies learn to walk.

They make random steps, fall from unstable positions, and finally, they learn to stand upright and walk by understanding the hidden dynamics arising from gravity, and mass. Usually, no positive reward is given to the baby for walking. But the objective is to receive the least negative reward. In this case, least damage to the body while learning to walk.

Trial and error they say.

That does not mean the learning is random. It means that the path to optimal behaviour is not a one-shot solution but happens through a series of interactions with the environment and learning from feedback.

All this happens without higher cognition and reasoning. That’s the power of feedback! The learning is reinforced with the positive and negative feedbacks received from interactions. Once, the optimal behaviour is understood, our brain exploits and repeats the learned behaviour.

Recently, there has been a number of additions to the existing repository of reinforcement learning algorithms. But to understand the framework of reinforcement learning, there is a popular toy example of optimally navigating in a grid world (say 5×5). The grid world has discrete states with obstacles, a starting point, and a terminal point. The agent is randomly initialized in a state and the goal is to optimally navigate to the terminal state. The agent can take actions such as moving left, right, up, and down. The agent receives a reward of -1 for entering the next state, -10 for hitting the obstacles, and +100 for reaching the terminal state. Thus, the objective is to navigate to the goal position in the shortest possible distance without hitting the obstacles.grid

This problem, of course, is not difficult to understand and solve. The solution is simple when the value of every state is known. This is a metric that defines how good it is to be in a particular state. Based on this, we can formulate an optimal policy or behaviour.

But how similar is life when compared to this problem of reinforcement learning ?

Much. Except that we don’t have many algorithms, and episodes to establish an optimal behaviour. Essentially, every action in life is about making optimal decision. Given a state, what is the best policy I can follow?

We, as humans, like reinforcement learning agents, are left in a maze like grid world called life. The environment is highly stochastic and time-based. The starting state is biased, and the terminal state is uncertain. By biased starting state, I mean you can either be born in a better place with better opportunities or a worst place with no opportunities. By uncertain terminal state, I mean that death is possible anytime. However, the agents are allowed to make optimistic assumptions throughout the episode.

photo-1491485066275-97da4e681cb8

Before exploring the environment, the first step for the agent is to set the rewards. In reinforcement learning, reward design is usually a tricky process. If the rewards are poorly designed, the agent might be learning something else that is not intended.

How do humans set rewards in their life? Every person has their own way of defining their rewards. In most cases, it is to achieve prolonged happiness or satisfaction by setting goals, sub-goals and achieving them before the episode ends. Most humans follow hedonistic approach by setting immediate pleasures as their rewards. But focusing only on the short-term immediate rewards may not result in an optimal policy in the long run. 

But what policy to follow when the agent has defined a goal? Exploit or Explore or combinations? What about the ethical issues that arise while following a policy? What is right and wrong? No one knows. As said before, no one has a golden algorithm for these questions. The environment is highly stochastic where even the episode length, and terminal state are uncertain.

Some agents look far into the future, estimate the value function of each state regularly, and formulate their policy accordingly. They understand the importance or value of every stage of life, and take the optimal action. They exploit, and reach their goals before the end of episode, and receive a huge positive reward. Success, they call it.

Some agents take this success to the next level by finding the exact explore-exploit trade-off point. In addition to the known rewards, they discover rewards that were previously unknown to the agents who just exploit.

Unfortunately, many agents keep exploring the environment without understanding the importance of goal setting, and value function estimation. They make random moves, keep hitting the obstacles, and die without a policy towards the goal state. Their episode ends with a high negative reward.

Most agents achieve partial success by reaching a sub-optimal point. They manage to achieve few sub-goals but fail to reach their goals by making wrong assumptions, incorrect value function estimation, and by the wrath of stochasticity of the environment. Something is better than nothing, they say.

But is it possible to formulate a global optimal behaviour for this environment?

I don’t think so. The large number of hidden factors contributing to the stochasticity of the environment makes it really hard to come up with a single golden policy which assures success.

And the worst part, unlike the reinforcement learning agent, which runs millions of episodes to learn an optimal behaviour, we just have one episode.

Yes, only one. That’s unfair. But the good part is, you can learn from the episodes of other agents. If you are willing to.

– Pradeep


Image Sources :

1. http://pavbca.com/
2. https://unsplash.com/

Further Reading :

Reinforcement Learning : An Introduction – Richard S. Sutton and Andrew G. Barto

 

The Untold Story of Office Printers

Most of us use office printers for printing confidential documents and personal files without knowing the security risks. It is possible to track the printer usage. Even failed to print documents can be seen !

There are a number of ways.

1.There are few employee monitoring software which can provide the list of documents you printed.

http://www.surveilstar.com/printing-logs.html

2.By default, all printing events are written to the system log file.
 
https://technet.microsoft.com/en-us/library/cc758186%28v=ws.10%29.aspx

3.It is also possible to recover data from the printer.

It depends on which printer you are using.

Most multi-function printers or what is called MFPs have hard drives that record and store data. Most printers overwrite the data. But still, printing a confidential document poses a serious risk when you resell the printer.

How does it work ?

The digital information is transmitted to the printing device through a computer over a network. This data is stored on the hard disk so the device can print quickly and multi task.

How to know if your printer has a hard drive ?

1. Identify the printer company and model.
2. Go to their website and check whether hard disk in that model is standard or optional.
3. If its optional, there are some methods to check the presence of hard disk.

Think before printing your personal files using office printers.

– Pradeep