What is Machine Learning?

“Machine Learning” is the broad term covering all the algorithms that learn from data. But you might be wondering what this imply? Well, we have set up a thought experiment that explains the invention of Machine Learning.

Working for the Chinese government

Imagine that you have been hired by the Chinese government to censor the emails of the country’s citizens. Your task is simple: Everyday, you receive a hundred emails, and your job is to identify all emails that are hostile to the government. At the end of the day, you will provide your supervisor with the list of the emails you have identified, and your supervisor will tell you which emails you missed, and if you misidentified any.

Let’s presume that you don’t know Chinese. You do not identify a single email and must present a blank list to your supervisor at the end of the day. Your supervisor point to 5 emails that you failed to identify. Looking at the emails, you notice that all of them are quite long. Basically this means that your first day at work is quite unsuccessful.

– On your second day at work, you identify the 5 longest emails in your daily stack. Your disappointed supervisor explains that only 1 of the 5 require censorship, and furthermore, you missed to identify 3 emails in the stack that did require censorship.

– But studying the emails, you notice that the 4 emails requiring censorship all contain the same 2 characters somewhere in the body of text. On your third day at work, you identify all long emails containing these two characters.

– After a few weeks, you’ve come up with a set of such rules. While not perfect, you identify enough emails that you can keep your job.

Programming a spam filter

After a few months of following the same set of rules identifying emails, you grow tired of your new job. Luckily, you have a friend who is a computer programmer. Together, you decide to write a piece of software that do the manual task of applying your rules to the emails and identify emails that might need censoring.

When programmers write a piece of computer software, they must tell the computer exactly what to do.

However, this turns out to take more time than first anticipated. As it turns out, when programmers write a piece of computer software, they must tell the computer exactly what to do. As computers have no intuition nor any common sense, they take everything and don’t complain if the task they are given is nonsensical or destructive. It is therefore required of the programmers to be very precise when specifying what the computer should do, as computers otherwise tend to misinterpret the instructions.

Have you ever seen a programmer who was stressed out?

After a lot of work, you finally end up with a satisfactory computer program. The code that controls the program looks something like this:

“IF length OF email IS MORE THAN 500 AND IF email CONTAINS “政府” OR IF email …”

All programmers must painstakingly type in such instruction for their programs to function correctly. If a single character is out of order, or a piece of logic is unsound, it will break the entire program, making it completely useless. Have you ever seen a programmer who was stressed out? Now you know why.

With your new program in hand, you can sneak out of the office early every day. A few months pass, and everything seems great. But as time goes by your program starts to miss more and more emails. Why? Because the citizens that conspire against the government figure out how to write emails so that they are not caught by your computer program. Instead of writing long emails, they stick to short ones. They even start to use synonyms for the words that trigger your programs censorship.

So, you call your programmer friend again, and come up with a new set of rules. However, after a few months of using the new rules, the citizens learn to adapt their emails to avoid censorship again, and the process of updating the program must be repeated.

Wouldn’t it be great if your computer program could somehow figure out how to construct the rules by itself?

Wouldn’t it be great if your computer program could somehow figure out how to construct the rules by itself? Then you wouldn’t have to bother your programmer friend all the time.

Writing another program

You and your friend decide to write a program that, given a list of emails, and information about which ones are supposed to be censored (as provided by your supervisor in the example above) can use basic statistics to automatically generate rules of identifying the emails that require censorship.

The computer program will test a set of different hypotheses, such as:

  • Emails of a character length above a certain threshold needs censorship.
  • Emails containing certain characters needs censorship.
  • Emails not containing certain characters needs censorship.

How does the computer program do this? Since it has been given the correct answer by the supervisor, it tries out all hypotheses, and picks one that correctly identifies the emails that require censorship. When a new batch of emails arrive, it can use its current rules to first attempt to identify the correct email, and, when provided with the correct answer from the supervisors, come up with new set of rules.

That’s all there is to it. Rather than coming up with the rules by hand, the computer program uses statistics to determine which one of the rules that works the best. We call the process described above Machine Learning

The promise of Machine Learning

The promise of Machine Learning algorithms is not only to replace the process of writing the rules, but also the process of coming up with new rules continuously!

Machine Learning algorithms are very good tasks such as censoring emails. As a matter of fact, some of the earliest successful machine learning algorithms were spam filters.

The ability for computers to learn new skills from data has turned out to be a tremendously powerful idea.

The ability for computers to learn new skills from data has turned out to be a tremendously powerful idea. It has turned out to be so distributive, that some people argue it will become the most important invention in the coming decades. As machines becomes better and better at learning new skills, they are expected to replace humans in many different domains.

If you think about it, humans essentially learn new skills in the same way that computers do; by processing large amounts of data. What we see, hear and feel is nothing more than continuous streams of data that give the information needed to navigate in the world.

As a matter of fact, todays best Machine Learning algorithms draw a great deal of inspiration from the inner workings of the human brain.

If you want to learn more about how this works, check our blogpost “What is a Neural Network”.

If you are interested in hearing more about how to get started, please contact us at  hello@botxo.co – or give us a ring if you need more customer cases +45 26 71 58 45 . 

Want to know more about Chatbots – Book a Demo!