The AI Craze Archives - Page 3 of 3 - upGrad Campus

An Overview of Machine Learning Algorithms for Beginners

But first, what is Machine Learning?

But first, what is Machine Learning?

Machine Learning is a subset of Artificial Intelligence that deals with teaching machines to think like humans. According to famed computer scientist, Arthur Samuel, it gives computers the ability to grasp things without the use of heavy programming. One could also call it the subset of Computer Science that teaches machines to program themselves. 

It’s not plain old programming though. In Traditional Programming, data and programs are run on the computer to produce the desired output. Machine Learning works differently. Here, the data and the desired output are run on the computer to create a program which can automate a number of tasks. 

But once a machine knows how to behave and work around different kinds of situations, the real-world implications are boundless! It is this trait which makes Machine Learning one of the most in-demand skills of the 21st century.

What is the difference between AI and ML?

What is the difference between AI and ML?

Many people tend to use the terms Artificial Intelligence and Machine Learning interchangeably. Although Artificial Intelligence and Machine Learning are closely related, there are significant differences between the two. Artificial Intelligence is a technology that mimics human intelligence and behaviour. Machine Learning is a subset of AI which uses past data to find patterns and program itself to make predictions and respond to those patterns. 

Artificial Intelligence makes use of Machine Learning to simulate human thinking. Machine Learning relies on data to complete specific tasks, while modifying itself to improve the accuracy of the results.

How do Machine Learning Algorithms work?

How do Machine Learning Algorithms work?

And here we come to the crux of the matter – how does one teach machines to think?

As we mentioned earlier, in a word, data. 

By feeding machines with reliable data, one can train them to draw meaningful insights and perform tasks. The step-by-step way of implementing a Machine Learning model is:

  1. Collecting data from reliable sources
  2. Cleaning data by removing unwanted/missing values, formatting them and splitting them into test data and training data
  3. Choosing a Machine Learning model (explained further below)
  4. Training the model by analysing the patterns and making predictions based on training data (from Step 2)
  5. Assessing the Machine Learning model with test data (from Step 2)
  6. Tuning the model parameters to improve its accuracy
  7. Using the model on unseen data

Machine Learning Engineers make use of programming languages like Python to execute the above steps.
Now that you have a basic understanding of how Machine Learning works, let us take a closer look at the different types of Machine Learning models.

What are the 3 main types of ML models?

What are the 3 main types of ML models?

The 3 types of Machine Learning models are:

  1. Supervised Learning
    As the name suggests, supervised learning is when a Machine Learning algorithm or a Machine Learning model learns with the help of a supervisor. This means, there is a feedback system that explains the model whether or not it is working correctly.
    Let us understand this with an example. One of the most basic ML algorithms is the image classification model, which distinguishes between whether an image is that of a cat or a dog. If the model guesses correctly, then the supervising entity has nothing to do. But if the model guesses incorrectly, then the Machine Learning Engineer has to tweak the parameters so that it works properly. A more complex example is to do sentiment analysis on a piece of text like a user’s tweets. Such a model will try to understand whether the user (or a customer) is happy with an experience.
    Supervised learning algorithms are further divided into supervised classification algorithms and regression algorithms.  We will explore ML classification algorithm and regression algorithm in depth in our subsequent blogs.
  2. Unsupervised Learning

    In the above examples, the data is labelled. In unsupervised learning, the input data for a model is unlabelled and the model has to recognise patterns in the same. For example, the demographic of customers that is likely to buy a particular product. A store may not always collect all the inputs, like age group, but based on other purchases, the model has to make an estimate and classify the user accordingly.
  3. Reinforcement Learning

    In a reinforcement learning model, the machine/agent to begin with understands two things – positive feedback and negative feedback. Then the agent interacts with the environment and checks the kind of feedback it has received and makes adjustments. A simple example for Reinforcement Learning would be a product recommendation system, where the model recommends a product to a customer and based on the feedback from the customer fine-tunes its recommendations.

 

What are some Machine Learning applications?

What are some Machine Learning applications?

Machine Learning is already everywhere, and its applications in the real world are increasing by the day. Some of the popular Machine Learning applications include:

  1. Image recognition
    One of the most well-known uses of Machine Learning is in social media applications which suggests users which friends to tag in which photos. Social media also makes use of other aspects of Machine Learning to suggest pages and accounts to follow and more!
  2. Speech recognition
    With the advent of Siri, Alexa, Cortana and Google Assistant, speech recognition has become an everyday part of our lives. Here, these virtual assistants use Machine Learning models to follow commands based on voice instructions.
  3. Traffic prediction
    Considering how rapidly the infrastructure of cities is changing, traffic prediction has become one of the essential applications of Machine Learning. By analysing the patterns of traffic on a daily basis, systems (like Google Maps) are able to accurately predict traffic at any given point on a route.
  4. Email & Spam filtering
    This application of Machine Learning is something you must have already observed. The filters in our email can mark mails as important/not important/promotional/social/spam and even blacklists.
  5. Medical Diagnosis
    Machine Learning can also be used for diagnosing diseases, including charting the position of lesions in the brain. In fact, one of our projects in the Artificial Intelligence & Machine Learning certification course is on melanoma detection.

These are just the tip of the iceberg. There are several uses of ML that are cropping up every day.

Conclusion

It’s clear that Machine Learning is one of the most exciting fields today. Every day new breakthroughs are being made in this field unlocking new opportunities for organisations. If you want to pick up these job-ready skills, check out our Artificial Intelligence & Machine Learning certification course which teaches you basics to advanced concepts from industry experts and covers 8 hands-on projects.
What are some other topics you’d like us to cover on Machine Learning? Let us know in the thoughts below.

Introductory Guide to Artificial Intelligence (AI) and its Applications.

Atta se sasta Data hai.

(Translation: Data is cheaper than flour!)

This seems to be the general sentiment of the masses today. 

And while that sounds funny, you have to acknowledge the truth in this statement.

Today, everything around us is either already automated or is in the process of being so. But automation doesn’t just happen overnight. These machines have to be constantly fed with data to help them learn and become of use. Be it Netflix recommendations or the Smart Tesla cars – we are used to having expert systems that have a brain of their own. And that ladies and gentlemen is the magic (the irony is not lost on us) of Artificial Intelligence.

What is Artificial Intelligence?

What is Artificial Intelligence?

Before we dive deeper into the applications of Artificial Intelligence, let us look at its origin story.

Famed Computer Scientist, Alan Turing asked himself “Can machines think?”, all the way back in the 20th century. Thus, the idea of Artificial Intelligence was born. Broadly speaking, AI is the ability to program machines to mimic human intelligence and automate our tasks. To put it simply, AI is the simulation of human intelligence in machines. Artificial Intelligence, which was once just an idea in theory, is now more prevalent than ever. 

AI programming focuses mainly on achieving 3 cognitive abilities:

  • Learning
  • Reasoning
  • Self Correction

What do these abilities entail?

Learning

To simplify this, think of machines as human babies. Babies are constantly bombarded with stimuli from the environment, that they then use to learn new things. Similarly in the case of machines, the machine is the infant and the raw data we keep feeding it, is used by the machine to ‘learn’ or pick up new skills. 

Reasoning

Despite the occasional need for calculators, the human mind is still the most well-oiled machine out there, built to pick up skills on its own. However machines (ironically built by humans) need an extra push to pick up new skills from the data they are presented with. Hence, these machines rely on certain algorithms which enable them to understand data and draw inferences.

Self Correction

Once the machine draws up its own conclusions, they are then checked with the real world solutions to measure the machine’s accuracy. Depending on how wrong the solution is, the machine learns from its mistakes and draws better conclusions the next time.

The underlying principle behind all AI systems remains the same as described above, i.e. to first learn, reason and then proceed to correct itself (although humans could use a bit of self correction too).

Types of Artificial Intelligence

Types of Artificial Intelligence

Artificial Intelligence is a broad term that encomposses many subsets like Machine Learning or Natural Language Processing and these subsets are known to many. Broadly speaking, there are 4 main types of Artificial Intelligence:

  1. Reactive Artificial Intelligence

The most basic type of Artificial Intelligence, Reactive AI, does not interact with the world. It lacks imagination and will respond in the exact same way every time when presented with the same situation, making them extremely trustworthy and reliable.

One of the most famous examples of Reactive AI is Deep Blue. Deep Blue is a supercomputer that was created by IBM. This supercomputer is famous for playing and winning a chess match against chess champion Garry Kasparov.

But how did Deep Blue win the game? 

In a reactive AI model, machines neither work with data nor do they have the facility to store any memory. They function depending on the way they are programmed, i.e., through a predictable output. Deep Blue made its move based on its observation from its opponent’s move. 

Another example of a game-playing Reactive AI is AlphaGo. Google Inc’s brainchild, AlphaGo is unable to evaluate future outcomes. Instead it relies on its own neural network to evaluate developments of the present game.

  1. Limited Memory AI

Limited Memory AI is being used worldwide today and is constantly experimented with.

A Limited Memory AI absorbs learning data and makes future predictions based on historical data. This form of AI automatically trains itself to evolve and become better. 

An example of Limited Memory AI is the Smart Car. A smart car is a self-driving car. How do these work? 

Based on the data fed, the car’s AI enhances its capabilities to understand its environment and self-drive in a safe and secure manner. 

  1. Theory of Mind AI

Although still in its development stage, Scientists claim that Theory of Mind AI will be considered successful when AI picks up the ability of decision making, similar to that of the human mind. To reach this stage, machines will have to understand human emotions and thereby act in accordance with these emotions to make decisions. 

This type of AI might not yet be fully functional, but we are getting closer and closer to the day machines respond to human emotions. An example of a recent success was Sophia

An AI built in the year 2016, it was capable of seeing human emotions and was also able to respond to these emotions. A small victory in the grand scheme of things! 

  1. Self-aware AI

Also another theory being experimented with, this type of AI is when machines reach a level of consciousness at par with humans. Artificial Intelligence experts claim that at this stage, machines will be fully aware of emotions and the state of minds of others around them. Their needs, emotions and desires will match that of human beings. 

What is the difference between Artificial Intelligence and Machine Learning?

What is the difference between Artificial Intelligence and Machine Learning?

The two terms are often used interchangeably and while they do share a lot of similarities there are certain key differences between the two. Let us explore these differences,

Machine Learning.

Machine Learning deals with systems using historical data to learn. Its main aim is to capture patterns present in historical data and to gain insights that could predict an outcome. It uses algorithms to “learn” from data, and these algorithms are usually specific to the task at hand. 

Just like AI, Machine Learning is also a very broad term and can be divided into 3 categories:

  1. Supervised

     

 It’s a method where you provide assistance to help the machine learn by labelling data.

For instance, you label a picture of a dog as “A Dog” along with a picture of a cat as “A Cat” and feed this data to the ML model. This assistance that you provided will help the machine differentiate the two and identify them accurately in the future.

  1. Unsupervised

As the name suggests, this type of model learns from data without any guidance. In contrast to the above example, with the classification of cats and dogs, in this case you would just feed the machine unlabelled data. The idea here is for the machine to just find similarities or differences within a given dataset, as opposed to accurately labelling things. So in this case the machine would be able to tell that these two things are different but would not be able to identify them as cats or dogs.

  1. Reinforcement

This Machine Learning model involves machines making decisions sequentially and calculating the rewards associated with the sequence. The end goal is to determine which sequence of events is associated with the maximum reward.

Machine Learning algorithms are everywhere in today’s world. Email spam filters, search algorithms, online recommendation systems, Facebook friend suggestions, stock price forecasting, bank fraud detection, etc. are just a few applications of Machine Learning in today’s world.

Artificial Intelligence

AI as we discussed, is the idea of machines mimicking human intelligence to solve problems. In fact, Machine Learning and Deep Learning are subsets of AI. Unlike Machine Learning or Deep Learning, however, with Artificial Intelligence, more emphasis is placed on the success of performing a task than its accuracy. 

AI includes three stages as well – learning from data, reasoning or making sense of the given data and finally making self corrections in the output if needed. AI and its applications include voice assistants like Siri & Alexa, humanoid robots like Sophia and chatbots, etc. Further, AI can be broadly classified as:

  • Artificial Narrow Intelligence (Weak AI)
  • Artificial General Intelligence (General AI)
  • Artificial Super Intelligence (Strong AI)

While they have their set differences, the reason AI and ML are used interchangeably, is because they are so often used together. An instance where Artificial Intelligence and Machine Learning go hand in hand includes: 

Speech recognition and Natural Language Processing where AI is used to identify the things spoken by humans and NLP techniques are used to process it. 

Sentiment Analysis is another such example which can determine the positive, neutral or negative attitudes that are expressed in text.

The Future of AI

The Future of AI

Artificial Intelligence is still a relatively new field, with a lot of promise and stakes resting on the coming future. With Speech recognition already taking off, it is exciting to see what AI systems can do with Theory of Mind or Self aware AI technology and how future applications of Artificial Intelligence manifest.

In the present, we are bound by the vast infrastructure and higher computational power needed to execute Artificial Intelligence. Although Gordon Moore stated in 1965 that “every two years the number of transistors on every chip is doubled while the cost of computer’s is halved”, AI is still a costly business. However, with or without the financial backing and computational power, AI has still come a really long way from Alan Turing’s initial question “Can machine’s think?” As we have seen, the history of Artificial Intelligence has made a tremendous impact on our lives and it seems all but inevitable that the future of AI is going to make a greater impact still. 

What are your thoughts on the future of Artificial Intelligence? Is a career in Artificial Intelligence worth pursuing today? Let us know in the comments below.

How Netflix uses Machine Learning to keep you up till 3 AM.

You might not judge a book by its cover, but you definitely watch movies based on your recommendation list. In today’s blog, we’re going to unravel the secret to Netflix’s “bingeability” and why you end up staying awake till 3 in the morning to binge-watch a show you would otherwise never be interested in.

The science behind Netflix “Recommendations”

It’s no secret that Netflix uses Machine Learning and complex algorithms to deliver the best recommendations amongst its competitors. 

For those of you still new to the tech scene –  an algorithm is a set of database instructions that tell the software or application what to do. Imagine the computer is Dora the Explorer. She needs a map to go about doing new things and adventures. The algorithm serves as a Maps app, the one responsible for charting out the best possible route for Dora to achieve her goals. 

In order for Machine Learning to actually be facilitated, the machine needs to obviously learn something. What is that “something”? It’s the data collected from our views, searches and clicks. Every time we watch a movie, search for a title or even click on a movie but not necessarily watch it, our action informs the machine about our possible interests and preferences. The algorithm being extremely sensitive, picks this data and rewrites and adjusts itself, every time we watch Netflix and give it an insight into our tastes. 

So what all Data does the algorithm use to remain so accurate?

According to Todd Yellin, VP Product at Netflix, the engine takes into account information such as, what people watch, what was it that they watched before and what did they watch after, what they watched a year ago, what all they watched recently and what time of the day did they watch these things. 

Netflix can’t just recommend the bestselling movies or the most cinematically advanced films to its viewers. Netflix suggestions have to be based on a viewer’s personality. Instead of just dumping their entire catalogue on a viewer’s home page, they curate lists using different algorithms present in their rankings, search bar, ratings, similarity and more. 

An amalgamation of all this information is the driving force behind Netflix’s successful recommendations. It is programmed to accustom itself to the most minor changes you bring  to the table. And have you ever noticed how perceptive the suggestions are? You can may have watched one episode of a whole new genre – let’s say an anime or k-drama – but the next thing you know your entire feed slowly starts to change, with suggestions such as “Other K-drama’s you may like”, “Because you watched xyz anime” “The best of East-asia”. And obviously fueled by our own binge-watching beast, we end up watching an entire genre over the course of a month. 

The Human-Machine-Human-sandwich

We’ve spoken a lot about the above mentioned algorithm and how presently it tracks our viewing history. However this algorithm wasn’t born ready. And the groups you got grouped into didn’t appear out of thin air. This is the work of actual human beings, brought in to label and group movies into hyper-specific genres like “Visually striking witty comedies” “Classic feel good opposites attract romcoms” or our personal favourite, “Cynical Comedies Featuring a Strong Female Lead”. 

Each of these categories is what you get grouped into by the algorithm. And it’s never just one category. Every one of us gets grouped into multiple categories, which then dictate our taste and decide what will appear on our individual home screens. 

So without these hyper-specific categories made ready, the algorithm will not be able to complete its main job-  analysing data and grouping people into categories. 

But that’s not all what Netflix does to rope us into the binge watching cycle. 

Fast and Furious (with the judgement)

Netflix figured out that on an average, they had a golden time of 90 seconds. Only 90 seconds. In this one-and-a-half minute, their viewer would make a judgement as to whether or not they were going to watch the movie that caught their attention. 

In order for their viewers to evaluate and better understand the content of a film under 90 seconds, Netflix decided to use engaging Movie posters. Neuroscientists have proven that an image can be processed and judged by a human in under 13 milliseconds. Compared to text, which takes a lot longer, an image does speak a thousand words.

The movie posters they put out originally were given to them by the studios at the time, and they were the generic movie posters that would be displayed in cinemas and on billboards. Now while these posters worked for their respective print mediums, Netflix caught on to the fact that it dampened the attractiveness of the movie on their platform for their viewers. Knowing that they had only 90 seconds to appeal to their audience they came up with a series of experiments in order to boost engagement.

They performed a series of A/B tests and explore-exploit tests, through which they tested whether the movie poster shown to the viewer would have an effect on their judgement of the movie itself. 

They designed a test that displayed multiple sets of images for each title, where the original movie poster provided by the studio acts as the control in this test. Their results, overall, unanimously proved that the audience/ test subjects reacted more strongly when faced with a complex set of emotions on the posters.

A good example of this test would be Strangers Things, the hit netflix drama series. Notice how many different ways the poster is shown to all the different accounts.

AI and ML

In order to decide which user will be shown which poster, Netflix tracks what the user has been watching again and groups that user into certain categories (again). So consider a movie like “The Intern”. If User X  happens to watch more of Anne Hathaway movies as compared to Robert De Niro, they are more likely to click on a movie poster with her face.

The same goes for genres as well. If User Y watches a lot of horror movies, they will react more strongly to a poster that depicts the horror elements of that movie.

The Morning after...

So there you have it – the reason behind all your late night binge watching sessions. It’s a combination of machine learning, human intervention and personalised artwork that have resulted in Netflix’s 1 billion dollar algorithm for recommendations. This award winning strategy, however, is just the beginning to Netflix’s ploy to boost engagement. Don’t get too curious though, since that probably means we’ll just have to pull through more all nighters.