An Enlightenment to Machine Learning
Preamble
The concepts of Artificial Intelligence and Machine Learning always evoke the ancient
Greek myth of Pandora’s box. In the fairytale version of the story, Pandora is
portrayed as a curious woman who opened a sealed urn and inadvertently released
eternal misery on humankind.
In the original telling, Pandora was not an innocent girl who succumbed to the
temptation to open a forbidden jar. Instead, as the poet Hesiod tells us, Pandora was
made, not born.
Like the genie that escaped the lamp, the horse that fled the barn, the myth has become
a cliche. Now, let us explore the Machine Learning to get more fascinated!
Data Everywhere!
We are drowning in information and starving for knowledge.
Google
24 petabytes of data are processed per day.
Facebook
10 million photos are uploaded every hour.
Youtube
1 hour of video is uploaded every second.
Twitter
400 million tweets are posted per day.
With data increasing every day, we can believe that smart data analysis will become
more prevalent as a fundamental ingredient for technological progress.
Why Machine Learning?
We interact with Machine Learning models every single day without our knowledge.
Every time we perform a Google search, listen to a song or even take a photo, Machine
Learning is becoming a backbone process behind it by invariably learning and
improving from every interaction.
Machines can drive your car for you, detect eye diseases, unlock your phone with face
recognition, and the list never ends.
Let us get started with Machine Learning!
What is Machine Learning?
Definition
Machine Learning is the field of study that gives computers the ability to learn
without being explicitly programmed.
Machine learning is a tool for turning information into knowledge.
We are DATAFIED! Wherever we go, we leave a data trail. Data becomes fruitless unless
we discover the hidden patterns. Wondering how? Yes! Machine Learning is a magic
wand that turns information into knowledge, which will do wonders for humankind.
Deep dive into the concepts to know more.
Traditional Learning vs. Machine Learning
Traditional Learning
Blends human-created rules with data to create answers to a problem.
Machine Learning
Uses data and answers to uncover the rules that build a problem.
What Machine Learning does?
Do you want to predict a category?
Machine Learning has Classification
Example
Predict if the stock price will increase or decrease.
Do you want to predict a quantity?
Machine Learning has Regression
Example
Predict the age of a person based on their height, weight, and health factors.
What Machine Learning does?
Do you want to detect an anomaly?
Machine Learning has Anomaly Detection
Example
Money withdrawal anomalies can be discovered.
Do you want to discover structure in unexplored data?
Machine Learning has Clustering
Example
Finding a group of customers with similar behavior based on their buying data history.
Machine Learning Adventures
Explore the adventures of Machine Learning in this video.
Prelude
While a great deal of engrossment has been towards model building, model tuning, and
model evaluation, many individuals still find themselves asking basic inquisitive
questions like
What is the life cycle of Machine Learning?
This section of the course will aid in answering this question. Keep reading to know
more!
Big Picture
The big picture of the Machine Learning process lies in the following 9 steps, namely:
1. Defining Project Objectives
2. Gathering Data
3. Exploratory Data Analysis (EDA) and Data Cleaning
4. Choosing a Model
5. Training
6. Evaluation
7. Hyperparameter Tuning
8. Interpret and Communicate
9. Deployment and Documentation
Defining Project Objectives
The first step of the life cycle is to recognize the opportunity for tangible
improvement of activities, enhance customer satisfaction, or create value
otherwise.
It is critical that you understand the problem you are trying to solve. In this stage,
you should also be identifying the central objectives of your project by
identifying the variables that need to be predicted.
Gathering Data
This is considered to be the primary step of the Machine Learning process.
The quality and quantity of data you gather in this step will determine how
efficient your model will be.
Some important things to remember while gathering data are:
Data can be collected from anywhere in any format.
More training examples will aid the model to be more efficient.
Make sure the number of samples for every class or topic is not
overly imbalanced.
Ensure that your samples adequately cover the space of possible inputs, not
only the common cases.
Exploratory Data Analysis (EDA) and Data
Cleaning
Exploratory Data Analysis (EDA)
Analyzing datasets to summarize their notable characteristics is called
Exploratory Data Analysis.
It helps in performing investigations on data to discover hidden patterns,
anomalies, and so on.
It aids in checking assumptions and hypothesis with the help of summary
statistics.
Data Cleaning
Data can have several shortcomings. A few are:
1. Missing values
2. Duplicate data
3. Invalid data
The process of detecting, correcting, and ensuring that the given dataset is error-
free, consistent enough to use, is called Data Cleaning.
Choosing a Model
There are numerous models that researchers and Data scientists have created
over the years.
Some are very well-suited for image data, while others are suited
for sequences, text-based data, and many more.
Choosing the right model for the problem will impact the efficiency of the model.
Explore this video to know the different constraints for choosing different models.
Training
The next step of the Machine Learning process, often known as the bulk of ML,
is Training the model.
This step is very similar to a person who is learning to drive for the first time.
Though they do not know any of the basics initially, a licensed driver emerges
eventually, after a lot of practice and feedback.
The data is split into Training Data and Testing Data.
The model is trained with the training data using different ML algorithms by
adjusting the parameters in multiple iterations.
The testing data is put aside as unseen data to evaluate your models.
Evaluation
Once the training is complete, it is time to see if the model is any good,
using Evaluation.
This is where that dataset that we set aside earlier comes into play, that
is, Testing Data.
Evaluation allows us to test our model against the data that has never been used
for training.
This metric will enable us to see how the model might perform against data that it
has not yet seen.
This is meant to be representative of how the model might perform in the real
world.
Hyperparameter Tuning
After the evaluation step, it is time to see if we can further improve our training by
tuning different parameters that were implicitly assumed in the training process.
This process is called Hyperparameter Tuning.
The tuned model is once again evaluated for model performance, and this cycle
continues until the final best performing model is chosen.
Interpret and Communicate
The most challenging task of the ML project is explaining the model's output.
During the earlier days, Machine Learning was considered a BlackBox because it
was hard to interpret their insights and values.
The more interpretable your model is, the easier it is to communicate your
model's importance to the stakeholders.
Deployment and Documentation
Model deployment often poses a problem because of the coding and data
science experience it requires and because the time-to-implementation of
traditional data science methods from the start of the cycle is prohibitively long.
The trained model has to be deployed in a real-world system to be efficient to
humans.
It can be deployed using any framework like Flask, Cloud, Azure, and so on.
Document your project well for your successors to handle it.
Prelude
Machine Learning is an umbrella term that covers 3 learning techniques. In this
section, let us unveil them to understand more about Machine Learning.
Types of Machine Learning
The types of Machine Learning are as follows:
Supervised Learning
Unsupervised Learning
Reinforcement Learning
Supervised Learning
Supervised learning is the Machine Learning task of learning a function that
maps an input to an output based on example input-output pairs.
It infers a function from labeled training data.
Each training example is a pair consisting of an input object and the desired
output value.
A supervised learning algorithm analyzes the training data and produces
an inferred function, which can be used for mapping new examples.
Applications
1. Spam Detection
2. Pattern Recognition
3. Speech Recognition
Unsupervised Learning
Unsupervised Learning helps in uncovering hidden patterns from unlabeled data.
Applications
1. Recommender Systems
2. Targetted Marketing
3. Customer Segmentation
4. Structure Discovery
Reinforcement Learning
Reinforcement Learning is a type of Machine Learning in which software agents ought
to take actions in an environment to maximize the notion of cumulative reward.
Applications
1. Genetics
2. Economics
3. Robot Navigation
Know the Differences
Know the differences between the various learning techniques through this video.
Machine Learning in SDLC
The image depicted above illustrates how to integrate the process of Machine Learning
into the traditional Software Development Life Cycle (SDLC).
The three phases include:
1. Planning
2. Data Engineering
3. Modeling
Prelude
Are you confused about the jargons and terms in Machine Learning? This section is
here to help you.
Few key terminologies to be known while using the Machine Learning model are
discussed in this section.
Machine Learning Terminologies
Accuracy
Accuracy is the percentage of correct predictions made by the model.
Algorithm
Machine learning algorithms are programs (math and logic) that adjust
themselves to perform better as they are exposed to more data.
The learning part of Machine Learning implies that programs change how they
process data over time, much as humans change how they process data by
learning.
So, a Machine Learning algorithm is a program with a specific way to adjust
its parameters, given the feedback on its previous performance , making
predictions about a dataset.
Examples
Linear regression
Decision trees
Support vector machines
Neural networks
Machine Learning Terminologies
Categorical Variables
Categorical variables are variables with a discrete set of possible values.
They can be ordinal or nominal.
Classification
Classification aids in predicting the categorical output.
Clustering
Clustering is the unsupervised grouping of data into buckets.
Machine Learning Terminologies
Dimension
The dimension of data denotes the number of features in a dataset.
Feature
For a dataset, a feature represents the combination of attribute and value.
Feature Selection
Feature selection is the process of selecting relevant features from a dataset for
creating a Machine Learning model.
Machine Learning Terminologies
Hyperparameters
Hyperparameters are higher-level properties of a model, such as how fast it can
learn or the complexity of a model.
Instance
An instance is a data point, row, or sample in a dataset.
Label
The label is the answer part of the observation in supervised learning.
Machine Learning Terminologies
Outlier
An outlier is an observation that deviates significantly from other observations in the
dataset.
Regression
Regression predicts the continuous form of output (For example, price, sales, and so
on).
Validation Set
The validation set is a set of observations used during model training to provide
feedback on how well the current parameters generalize beyond the training set.
Prelude
Let us now explore the following popular Machine Learning techniques:
Classification
Clustering
Association Rule Mining
Outlier Detection
Regression
Classification
Definition
Classification is the process of identifying a category to which a new observation
belongs, based on a training set of data containing observations whose categories are
already known.
It follows a two-step process, namely:
o Learning Step - Training phase where a model is constructed.
o Classification Step - Predicting the class labels and testing the same for
accuracy.
Classification predicts the value of the categorical variables.
Classification Concept
This video unveils the concept of classification with an example.
Clustering
Clustering is the task of grouping a set of objects, such that objects in the same
cluster are similar to each other when compared to the objects in the other clusters.
Distance measure plays a significant role in clustering.
Clustering is an unsupervised learning method.
The common distance measures used in various datasets are as follows.
Numeric Dataset
- Manhattan distance
- Minkowski distance
- Hamming distance
Non-Numeric Dataset
- Jaccard index
- Cosine Similarity
- Dice Coefficient
More on Clustering
Explore the types of clustering algorithms through this video.
Association Rule Mining
Association Rule Mining aids in identifying the associations, correlations, and frequent
patterns in data.
The derived relationships are represented in the form of Association Rules.
Association Rule Mining with Apriori
Watch this video to know the process of rule mining with Apriori.
Outlier Detection
Jiawei Han defines Outlier as
A data object that deviates significantly from the normal objects as if it were
generated by a different mechanism.
The types of Outlier are as follows:
Global Outlier
Global Outlier significantly deviates from the entire dataset.
Contextual Outlier
Contextual Outlier significantly deviates based on the context selected.
Collective Outlier
Collective Outlier is a subset of data objects that collectively deviates from the
entire dataset.
Regression
Regression analysis is a statistical method that aids in examining the relationship
between two or more variables of interest.
It examines the influence of one or more independent variables on
a dependent variable.
Prelude
There are a variety of algorithms available in the Machine Learning world.
This section will guide you through the commonly used Machine Learning
Algorithms.
Decision Tree
A Decision Tree (DT) is a tree-like model of decisions and possible
consequences, chance event outcomes, resource costs, and utility.
Decision Trees are a non-parametric supervised learning method used for
classification and regression.
Watch this video to know more.
Naive Bayes
A Naive Bayes classifier is a probabilistic Machine Learning model that is used for
classification tasks. The crux of the classifier is based on the following Bayes theorem
formula.
P(A|B)= P(B∣A)P(A) / P(B)
Support Vector Machine
Support Vector Machine (SVM) is a supervised machine learning algorithm. It is used
for classification or regression type of problems.
Watch the following video to know more about SVM with an example.
K-means Clustering
Delve into this video to know about a type of clustering algorithm called K-means
Clustering.
Random Forest
Know more about the Random Forest algorithm through this video.
Linear Regression
Explore this video to know about Linear Regression Analysis.
Logistic Regression
Deep dive into this video to know about Logistic Regression Analysis.
Course Summary
Machine Learning is a modern innovation that has helped humans enhance industrial
and professional processes and everyday living.
Explore and delve deeper to increase your skills!
Qustion (13 CORRECTS)
The derived relationships from Association Rule Mining are represented in the
form of ___________.
Decision Trees
Association Rules
Data Rules
Which Machine Learning technique would you suggest to develop a machine
that detects the sudden increase or decrease in the heartbeat?
Outlier Detection
Classification
Regression Analysis
Which of the following Machine Learning models would you suggest to predict
a quantity?
Classification
Regression
Clustering
______________ is given a system of rewards and punishments.
Supervised Learning
Reinforcement Learning
Unsupervised Learning
__ Learning uses data and answers to uncover the rules that build a problem.
Traditional
Machine
Linear Regression helps in predicting the ____________ output.
Discrete
Continuous
Clustering is a/an ____________ learning method.
Supervised
Unsupervised
Support Vector Machine is used for ____________ type(s) of problems.
Classification and Regression
Regression
Classification
_____________ Learning draws inspiration from psychological behavior.
Supervised
Reinforcement
Unsupervised
_____________ is a tool for turning information into knowledge.
Data Transformation
Data Analysis
Machine Learning
______________ outlier deviates significantly from the entire dataset.
Contextual
Global
An observation that deviates significantly from other observations in the
dataset is known as ____________.
Outlier
Category
Label
A marketing company wants to group its customers into various groups to
advertise accordingly. Which Machine Learning technique would you suggest
for the company?
Clustering
Classification
Regression
A credit card company receives thousands of applications for new credit card
issues with attributes like salary, debts, and so on. Which Machine Learning
technique would you suggest to categorize applications into good credit and
bad credit?
Classification
Outlier Detection
____________ learning blends rules created by humans with data to develop
answers to a problem.
Machine
Traditional