Have you ever wondered how the google voice assistant recognizes what we speak and convert it to text? Or how does Amazon gives us different and mostly accurate recommendations? Or maybe how Gmail knows which email is potential spam?
Many applications that we see around us uses Machine Learning, Data Science, or Artificial Intelligence to provide us with different services. From Google Translate to Self Driving Cars, all the applications and software that try to predict, classify, or maybe even analyze some data use Artificial Intelligence and Machine Learning.
In this post, we are going to discuss what really is machine learning or artificial intelligence and how it actually works on the ground level. So let us begin by understanding what is Artificial Intelligence.
Artificial Intelligence until now has no exact definition and constantly gets redefined. But to understand its basis, we can define AI as something that is both autonomous and adaptive, which means, the program should be able to perform tasks by itself without requiring constant guidance as well as keep improving itself by learning from previous experiences.
For Example, the spam filter of Gmail detects most of the spam emails without requiring us to guide it or reprogram it, and when we mark an email as spam, it automatically reinforces or updates its program in order to more efficiently and accurately detect spam mails in future. This is a typical example of AI. Also, a very similar pattern is followed in most of the recommendation systems, like the one in Amazon and Google News. From our previous activities, they determine our interests and then show products or contents related to them.
Now if you are a Benedict Cumberbatch fan, you might have seen the movie “The Imitation Game” which also holds an 8.0 IMDB Rating, where Benedict Cumberbatch has starred as Alan Turning (Do check the footnotes for more info).
Alan Turing was one of the greatest mathematicians, and is widely considered to be the father of theoretical computer science and artificial intelligence. He was the first person to theoretically and mathematically explore the possibilities and concepts of Artificial Intelligence. He published the paper named “Computing Machinery and Intelligence”. It was the first one to introduce the concept of AI and the Turing Test, which can be stated as the first serious proposal in the philosophy of AI. “The ACM A. M. Turing Award is an annual prize given by the Association for Computing Machinery (ACM) for contributions ‘of lasting and major technical importance to the computer field’. It is generally recognized as the highest distinction in computer science and is known as or often referred to as the ‘Nobel Prize of Computing’. ~ Wikipedia”
John McCarthy, also known as the Father of AI, has given some of the most important contributions in the field of AI. He developed the first programming language for AI programming LISP, which is still widely used in most of the AI based applications. He was awarded many honors for his works, including ACM Turing Award, Kyoto Prize, National Medal of Science, and Benjamin Franklin Medal.
There is a very small difference between the term Machine Learning (ML) and Artificial Intelligence(AI). Now in some cases, there is a possibility that AI might not be adaptive and only autonomous. For example, a chatbot that works on a large set of human-defined rules. Let us understand this by thinking that it is a health test chatbot, which can test our mental health. So, we define some set of questions and possible answers in chatbot, like a question can be “Do you have a fever?” and the possible keywords in the answer can be “yes”, “no”, “a little” etc. Now if you observe carefully, this chatbot is autonomous, which means that it will ask questions by itself, collect answers by itself and also determine a result by itself, but it is not adaptive which means that it will not improve by itself.
This chatbot will be considered as an AI program but not as a ML program, because adaptability is one of the key requirements of Machine Learning.
Today ML has a variety of algorithms, which are used for majorly two purposes: Classification and Prediction, and we can categorize different ML applications into three categories: Supervised Learning, Unsupervised Learning, and Reinforcement Learning.
Even the most random data points filled with chaos contain a pattern of symmetry in them. In the real world, for most of our practical purposes, the classification or prediction of anything can be broken down into a set of objective and subjective categories, where the objective ones can be used to detect patterns in data.
Image for the email spam filter
For Example, let us bring back our email spam filter. Now to know if an email is a spam or not, there are several factors (subjective and objective), but if we start picking the objective ones, they would be: number of words, country of origin, number of links, number of some common spam words and a few more. Now, we can create a dataset of emails, and their objective factors, and label them as spam or not spam. Once we have built a dataset of a few thousand emails, we can create an ML model to find patterns and classify the emails. Fortunately, most of the algorithms are nowadays prebuilt, and we can just configure them as per our needs. Like in this case, I am going to use an algorithm named logistics regression. You can read more about it over here.). It is often used for binary classifications. Now since we would like to train our model (feed it data so that it can recognize patterns), we would also like to keep some data for testing our models' performance after training. So, we randomly split the data in an appropriate ratio, like in this case, we can reserve 20% data for testing. Once we have trained the model and tested it, we will have our metrics that determine the accuracy and efficiency of the model.
Now it is alright if the above paragraph was not completely clear to you, since it does contain some technical details, but I hope you have got a basic idea of how exactly the ML models work. Although, if you want a more technical or detailed explanation for spam detection using logistic regressions, do checkout this post.
Now that we have a basic understanding of artificial intelligence and machine learning, we can understand how different algorithms work and how they can be optimized using different functions. So, to know more about the topic, just follow up with the post, and I will keep adding different posts related to computer science concepts, from a very fundamental point of view.
I hope that you enjoyed reading this post. If you would want me to create a post on any different topic, let me know in the comments section.