Our terms of service are changing. Learn more.

Publication

Machine Learning   Opinion

Machine Learning is Conquering Explicit Programming

Author(s): Vaibhav Khandelwal

Machine Learning, Opinion

Are machines better than humans?

Photo by Lukas on Unsplash

Before we proceed further to this post let us first understand what is a binary classification. So let’s understand this by a very simple instance. You are at home and it’s lunchtime, your mom comes to you and asks if you are hungry and want to have your lunch, your answer will be either “yes” or “no”. You only have two options to reply i.e. binary options. Let’s take another example of a student who has just received his result of grade 12 the result will be “passed” or “failed”. These two examples fall under the binary classification as they have two options. Now let’s see how expert systems or rule-based systems are used for Binary Classification.

The expert system in Binary Classification:

The task of the machine is to check whether the image given to a machine contains text or not?

To understand this let’s see how Humans make decisions?

Consider the Health domain: Suppose a doctor is examining the patient and he needs to check whether the patient has Dengue or not?

The doctor is looking at several factors like Skin rash, fever, headache, cold cough, vomiting, and decides whether the person has dengue or not.

Factors Looked up by Doctors- Image by Author

The doctor checked one of the patients with the shown symptoms and did not find the dengue.

Symptoms of a patient with no Dengue- Image by Author

The doctor then checked another patient and found most of the symptoms were there which were enough for the doctor to declare the patient has Dengue.

Symptoms of a patient with Dengue- Image by Author

So now the question arises how the doctor is making all such decisions??

The answer to this is historical data. The doctor had encountered several patients and based on his experience he is now making all such decisions whether a patient has dengue or not.

The below-shown image contains the historical data of four patients.

Historical records of patients- Image by Author

As machines understand only the numbers so let’s take ‘CROSS’ as ‘0’ and ‘TICK’ as ‘1’, so the historical data will appear as follow:

Historical data in numerical form for Machine Understanding- Image by Author

So what are the Semantics of decision making by doctors?

2 things that play the role there: Feature and Rules.

Features are the inputs or symptoms that we are taking- Skin rash, fever, headache, cold cough and vomiting.

Rules are the permutations of symptoms going on in the head of the doctor which decides whether dengue is there i.e suppose if 2 or more symptoms are positive or 3 or more are positive then the person has dengue.

Features and Rules- Image by Author

Now we want to outsource these rules to a machine in the form of a program so that the machine can execute the program by taking some input and give us the output. We’ll write an if-else condition and based on the conditions the program will give the output.

Outsourcing the rules to the machine through program- Image by Author

Limitations of an expert system:

Let’s take a situation here: Suppose you have a company named Data Science Arena and your company is to hire a person for a job.

So for hiring someone, the hiring manager is going to look at various parameters like- 10th marks, 12th marks, if he/she is a graduate, what was the CGPA, what all projects have been done, and some other parameters. The hiring manager will make different permutations of tasks in his/her mind and then he’ll decide whether to select or reject a candidate.

Hiring Scenario- Image by Author

But if the tasks of hiring are comparatively large then it would be very difficult for any human to make the permutations of the tasks and the company will prepare a program to be fed to the machine to make it process and give the output.

Thus comes the first limitation– If the number of features (tasks here) are more then it won’t be possible to come up with the different permutation easily and thus difficult to bring out an if-else program easily.

Also as there would be a large number of historical data of the employees who had been hired and also the ones who have left the company. So looking at the different scenarios out of the large historical data it won’t be easily possible for a human to write a program out of it.

The data appears to be as follows:

Historical data of 4 Employees- Image by Author

Looking at the data one can see that the rules for forming the permutations would be too complex.

Thus comes the second limitation– Even if anyhow you came up with the rules but it won’t be possible to remember all the rules as the rules would be too much complex.

Also sometimes the rules are inexpressible i.e. suppose the hiring manager hired a person based on his honesty. So how can we express this as a rule?

As honesty can’t be expressed in any quantitative form thus making it as the third limitation.

So to solve the above limitations we use machine learning. It takes the inputs and forms a function f(x1, x2, … xn) that includes all our permutations and based on the input provided, gives us the output. The function formed can be a linear or of any degree based on the inputs.

Thanks for reading. Hope this blog gave you some insights about how machine learning is conquering the explicit programming. 😃


Machine Learning is Conquering Explicit Programming was originally published in Towards AI — Multidisciplinary Science Journal on Medium, where people are continuing the conversation by highlighting and responding to this story.

Published via Towards AI

Feedback ↓