DEV Community

Divyessh Maheshwari
Divyessh Maheshwari

Posted on • Originally published at Medium on

Artificial Intelligence and Machine Learning

Have you ever wondered how does 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 a potential spam?

Many applications that we see around us uses Machine Learning or Data Science or Artificial Intelligence to provide us with different services. From Google Translate to Self Driving Cars, all the applications and software that tries to predict, classify or maybe even analyse some data uses 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

Artificial Intelligence until now has no exact definition and constantly gets redefined. But to understand it’s 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, in spam filter of Gmail, it detects the 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 patter 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 it.

Now if you are a Benedict Cumberbatch fan, you might have seen the movie “The Imitation Game” which also holds a 8.0 IMDB Rating, where Benedict Cumberbatch has starred as Alan Turning (Do check the footnotes for more info).

Alan Mathison Turing

Alan Turing was one of the greatest mathematicians, who 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

John McCarthy, also known as the Father of AI, has given some of the most important contributions in the field of AI. He developer the first programming language for AI programming LISP, that is still widely used in most of the AI based applications.

He was awarded many honours for his works, including ACM Turing Award, Kyoto Prize, National Medal of Science and Benjamin Franklin Medal.

Machine Learning

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 in a chatbot which 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 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 answer 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 consider 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 categorise different ML applications into three categories : Supervised Learning, Unsupervised Learning and Reinforcement Learning.

The Basic Idea behind ML

Even the most random data points filled with chaos contains a patter on 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 there objective factors, and label them as spam or not spam. Once we have built a dataset of a few thousand emails, we can create a ML model to find patterns and classify the mails. Fortunately, most of the algorithms are nowadays prebuilt, and we can just configure them as per our need. Like in this case, I am going to use a 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 recognise patters), 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 accuracy and efficiency of 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 for 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.

Conclusion

Now that we have a basic understanding of artificial intelligence and machine learning, we can understand about how different algorithms work and how they can be optimised 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.

The Imitation Game : Wikipedia / IMDB

Top comments (1)

Collapse
 
grommor profile image
Amir • Edited

Headpix prioritizes security and privacy. The service doesn’t require you to upload personal photos, ensuring your identity remains protected. The ai generate headshots unique images, meaning there’s no risk of duplicating someone else’s face. This focus on privacy and security makes Headpix a trustworthy option for generating headshots, especially for those concerned about data privacy.

Some comments may only be visible to logged-in visitors. Sign in to view all comments.