Machine Learning Tutorial Part 2: Applications & Methods

Blog/Article

Machine learning is everywhere, humans are using it extensively thereby generating more data, which in turn is helping the machine learn better. It is essential to know that Machine Learning is a part of the Artificial Intelligence environment. 

Unknowingly humans are using many algorithms from Machine Learning in their daily lives. Many industries are leveraging the power of ML to achieve their goals, get deeper insights into their data, analyze them and take relevant decisions based on it. 

Let us look at a few significant real-world applications of Machine Learning: 

Image/Face recognition 

Ever wondered how Facebook gracefully suggests friends and helps in identifying faces? All thanks to image/face recognition algorithms that help in detecting faces and tagging them for mutual friends.  Applications keep track of the people we connect with (online), groups that we are a part of, interests, and common friends. Based on the concept of continuous/active learning, applications suggest potential people with whom we would connect to. 

Feeds of user accounts are personalized based on what they watch, what they shop, which helps provide relevant advertisements according to their past choices. 

Computer Vision 

It involves extracting information from images and videos. Pinterest app uses computer vision to identify objects (commonly known as pins) and suggest similar pins to users. If two or more users have some number of common pins, they are suggested pins of each other by understanding that if user A has interest in a, b, m and n, user B has interest in a, n, x and z, user A might be interested in x and z, user B might be interested in b and m. 

Spam or ham 

The most common application of ML is spam detection is emails. Every time a user sees an unwanted email in their account, they either ignore it or delete it. Machine Learning makes sure that such unwanted mails are not directed towards the inbox. They are, in contrast stored in a different folder, usually named 'spam'. 

How is this done? Once a user marks a mail as 'spam', Machine Learning algorithms (integrated with email service providers) classify such mails as spam by looking at the number and type of words in the spam email, the combination of words and many such criteria. The next time one such email shows up, the ML classifier marks it as spam and stores it in the 'spam' folder. 

VPA (Virtual Personal Assistants) 

Google Assistant, Amazon Alexa, Siri by Apple, all of these are considered as personal assistants, since they assist the user in performing certain task. They use voice recognition techniques to identify what the user is asking for. They can be initiated by activating them with a specific statement. 

The information provided by the user is collected and refined, based on how the user previously involved in a conversation with the assistant. Based on this data, the responses are rendered to the user. 

GPS navigation 

How does ML figure out the location of traffic congestion and show it in red colour on the map? Based on GPS equipped in cars and the daily used routes, ML helps detect traffic congestions. 

When a user searches for a location, maps sometime provide suggestions and the user selects one of these suggestions or provides an altogether new location. When user selects a location from the recommendation provided, map learns about the user’s preference. Similarly, when the user selects a new location, it collects this data and stores it as the user’s preference. 

Chatbots 

Instead of human interference while dealing with trivial questions, chatbots (commonly known as ‘bots’) are used. They are programmed to talk in a human-like manner and are mostly available to answer the user’s query. They simply extract data from websites and give it to the customers. 

There are different kinds of chatbots, some which rely on rules (rules defined that help in interacting with customers) and some that use reinforcement learning (learning based on feedback received). This way, human resources can be used for other tasks which require human assistance. 

Fraud detection 

Cyberspace can be made a secure place by implementing ML algorithms that detect fraud, money laundering and other wrongdoings. Sometimes, when we buy products continuously and might pay using credit cards. Algorithms detect this as illegitimate transactions and send notification to the owner of the card enquiring if the transactions are theirs or not. 

Recommendations 

This could be movie recommendations, product recommendations on shopping applications, or just advertisements based on what the user previously searched for/shopped. For example: When a user shops for a baby product on an e-commerce website, the app will suggest other products which are related to the baby product or babies. 

If users sign up for subscriptions, they also receive push notifications or emails about products “which might interest you” or “you will love this”. Based on what we watch, and what we buy, Machine Learning algorithms provide suggestions for better experiences. 


Methods in Machine Learning

Machine learning algorithms can be implemented using a variety of learning methods. Every learning method has a set of algorithms that can be implemented in a specific language. In this post, we will understand these methods and some algorithms that come under these methods. 

Machine learning algorithms can be classified based on whether they learn with or without human supervision into 4 types: 

  • Supervised learning algorithms 
  • Semi-supervised learning algorithms 
  • Unsupervised learning algorithms 
  • Reinforcement learning algorithms

Machine learning algorithms can be classified based on whether they learn incrementally on the fly or not into 2 types: 

  • Online learning 
  • Batch learning 

Machine learning algorithms can be classified based on whether they detect patterns in data or compare new data points to previously seen data points into 2 types: 

  • Model-based learning 
  • Instance-based learning 

Supervised learning 

It is one of the most popular learning methods, since it is easy to understand and relatively easier to implement ad get relevant outputs. 

Consider this example: How does a child learn? It is taught how to walk, run, talk, and it is made to understand the difference between walking and running. 

Supervised learning works in a similar way, there is human supervision involved in the form of features being labelled, feedback given to the data (whether it predicted correctly, and if not what the right prediction has to be) and so on. 

Once the algorithm has been fully trained on such data, it can predict outputs for never-before-seen inputs in-line with the data on which the model was trained with good accuracy. It is also understood as a task-oriented algorithm since it focuses on a single task and is trained on huge number of examples until it predicts output accurately. 

Applications of Supervised Learning: 

  • Spam classification 
  • Face recognition 

Supervised algorithms can be classified into two categories: Classification algorithms and Regression algorithms. 

Semi-supervised-learning 

It comes in between the supervised and unsupervised learning algorithms. 

Why does it even exist? 

To bridge the gap that occurs due to usage of supervised and unsupervised algorithms. 

Supervised learning algorithms are expensive, meaning they need to be labelled (by a human). On the other hand, unsupervised learning algorithms might not be very accurate and might not be applicable in every field. 

In semi-supervised learning algorithm, the input data is a combination of labelled and unlabeled dataset. There is a small amount of labelled data and a comparatively large amount of unlabeled data. Similar kind of data is clustered into a single unit with the help of an unsupervised learning algorithm. The labelled data is used to label the unlabeled data further. 

Applications of semi-supervised learning algorithms: 

  • Analysis of speech 
  • Classification of content on the internet

Unsupervised learning 

This is the opposite of supervised learning, wherein no labelling is provided on the input data that is supplied to the unsupervised learning algorithm. The algorithm has to learn from the unlabelled data and perform operations over it on its own. Most of the times, real-world data is unstructured and unlabelled. Hence unsupervised algorithms need to be used. Otherwise humans interfere and label the input data so that it can be passed as input to a supervised learning algorithm. 

Consider this example: A set of images of horses in different angles, colours. No label is provided to the unsupervised learning algorithm indicating that all the images are that of horses. The algorithm itself learns from the images based on the features of these images, similarities, and differences. 

Applications of unsupervised learning: 

  • Clustering 
  • Anomaly detection 
  • Data pre-processing operations 

Unsupervised data can be classified into two categories: Clustering and Association algorithms. 

Reinforcement learning 

An algorithm that defines a reinforcement agent that decides what step has to be taken next so as to arrive at the result or find the optimal path. When no dataset is provided to a reinforcement learning algorithm, it learns from its surroundings and experiences. When an action is taken by the reinforcement algorithm, it is either awarded or punished (ways of awards and punishments differ based on the data available). 

If the algorithm is awarded, it moves in the same direction or on the same lines. On the other hand, if the algorithm is punished, it understands that it needs to find out a different way to arrive at the solution. 

How is it different from supervised learning algorithms? 

Supervised learning algorithm have an input and the expected output, whereas in reinforcement learning, the algorithm has to decide what action it needs to take next. 

Applications of reinforcement learning: 

  • Robotics for automation purposes 
  • Machine learning and data processing

Online learning 

It is also known as incremental learning or out-of-core learning. The baseline for this approach is that it assumes that learning environment changes constantly. Online learning refers to machine learning models that are trained consistently on new data and predict output while being trained on new data (in real time, basically). Whenever the model sees a new example, it needs to quickly learn it and adapt to it so as to consider this new example too while predicting output. 

Batch learning 

Batch learning refers to data learning over group. Data is grouped into different batches and different patterns are extracted from them. These patterns are learned overtime by the model. 

Model-based learning 

All the considerations about a particular problem in a domain is converted into the form of a model. When new data is encountered by the model, patterns are detected and these patterns are used to make predictions on the newly encountered data. 

Instance-based learning 

Instance based learning can simply be understood as clustering and regression algorithms whose result is a class label or a prediction. This prediction or label is based on how similar the nearest query is to the current query in the dataset. 


The LenovoPRO Community has partnered with KnowledgeHut  to provide valuable learning resources to our members, including the following tutorial series on Machine Learning! 

These chapters were originally featured on Knowledgehut at the following URL:

If you’re looking to upskill to advance your career, visit Knowledgehut today – plus, LenovoPRO Community members get 20% off your first course on the site (use promo code LENOVO)


What are your thoughts on machine learning? Do you have any familiarity with it when it comes to your business practices?

Leave your comments below to kick off the conversation!

3