Updated Unit 1
Updated Unit 1
TECHNOLOGY
FACULTY OF ENGINEERING & TECHNOLOGY
PARUL UNIVERSITY
A Machine Learning system learns from historical data, builds the prediction
models, and whenever it receives new data, predicts the output for it. The
accuracy of predicted output depends upon the amount of data, as the huge
amount of data helps to build a better model which predicts the output more
accurately.
Introduction to Machine Learning
Machine Learning
How does Machine Learning work
• Suppose we have a complex problem, where we need to perform some
predictions, so instead of writing a code for it, we just need to feed the data to
generic algorithms, and with the help of these algorithms, machine builds the
logic as per the data and predict the output. Machine learning has changed our
way of thinking about the problem. The below block diagram explains the
working of Machine Learning algorithm:
Introduction…..
The last step of machine learning life cycle is deployment, where we deploy the
model in the real-world system.
If the above-prepared model is producing an accurate result as per our
requirement with acceptable speed, then we deploy the model in the real system.
But before deploying the project, we will check whether it is improving its
performance using available data or not. The deployment phase is similar to
making the final report for a project.
Learning Paradigms in Machine Learning
Learning Paradigms in Machine Learning
Learning Paradigms in Machine Learning
1) Supervised Learning
• The goal of supervised learning is to map input data with the output data. The
supervised learning is based on supervision, and it is the same as when a
student learns things in the supervision of the teacher. The example of
supervised learning is spam filtering.
• The main goal of the supervised learning technique is to map the input
variable(x) with the output variable(y). Some real-world applications of
supervised learning are Risk Assessment, Fraud Detection, Spam filtering, etc.
Learning Paradigms in Machine Learning
2) Unsupervised Learning
• Unsupervised learning is a learning method in which a machine learns without
any supervision.
• The training is provided to the machine with the set of data that has not been
labeled, classified, or categorized, and the algorithm needs to act on that data
without any supervision. The goal of unsupervised learning is to restructure
the input data into new features or a group of objects with similar patterns.
• In unsupervised learning, we don't have a predetermined result. The machine
tries to find useful insights from the huge amount of data.
Learning Paradigms in Machine Learning
Advantages of Unsupervised Learning
• Unsupervised learning is used for more complex tasks as compared to supervised
learning because, in unsupervised learning, we don't have labeled input data.
• Unsupervised learning is preferable as it is easy to get unlabeled data in comparison to
labeled data.
Disadvantages of Unsupervised Learning
• Unsupervised learning is intrinsically more difficult than supervised learning as it does
not have corresponding output.
• The result of the unsupervised learning algorithm might be less accurate as input data
is not labeled, and algorithms do not know the exact output in advance.
Learning Paradigms in Machine Learning
3) Reinforcement Learning
Reinforcement learning is a feedback-based learning method, in which a
learning agent gets a reward for each right action and gets a penalty for each
wrong action. The agent learns automatically with these feedbacks and improves
its performance. In reinforcement learning, the agent interacts with the
environment and explores it. The goal of an agent is to get the most reward
points, and hence, it improves its performance.
The robotic dog, which automatically learns the movement of his arms, is an
example of Reinforcement learning.
Learning Paradigms in Machine Learning
Advantages and Disadvantages of Reinforcement Learning
Advantages
• It helps in solving complex real-world problems which are difficult to be
solved by general techniques.
• The learning model of RL is similar to the learning of human beings; hence
most accurate results can be found.
• Helps in achieving long term results.
Disadvantage
• RL algorithms are not preferred for simple problems.
• RL algorithms require huge data and computations.
• Too much reinforcement learning can lead to an overload of states which can
weaken the results.
Learning Problems
Most Common Types of Machine Learning Problems are:
⮚ Regression
⮚ Classification
⮚ Clustering
⮚ Time-series forecasting
⮚ Anomaly detection
⮚ Ranking
⮚ Recommendation
⮚ Data generation
⮚ Optimization
Learning Problems
Problem types Details Algorithms
When the need is to predict numerical Linear regression, K-NN,
Regression values, For example, house price random forest, neural
prediction networks
Logistic regression,
When there is a need to classify the data
random forest, K-NN,
in different classes,
Classification gradient boosting
example, classify whether a person is
classifier, neural
suffering from a disease or otherwise.
networks
When there is a need to categorize the K-Means, DBSCAN,
data points in similar groupings or Hierarchical clustering,
Clustering
clusters, this is called a clustering Gaussian mixture
problem. models, BIRCH
Learning Problems
When there is a need to predict a number based
ARIMA, SARIMA, LSTM,
on the time-series data
Exponential smoothing,
Time-series forecasting example, a time-series forecasting problem is
Prophet, GARCH, TBATS,
about forecasting the sales demand for a product,
Dynamic linear models
based on a set of input data
Isolation Forest,
a given record can be classified as an outlier or
Minimum covariance
unexpected event/item
Anomaly detection determinant, Local
example, credit card fraud transactions detection
outlier factor, One-class
is an anomaly detection problem.
SVM
6. Customer Segmentation
Accurate customer segmentation is crucial for effective ML algorithms.
Developing algorithms that recognize customer behavior and trigger
relevant recommendations based on past experiences is essential for
personalized user interactions.
7. Data Bias
Data bias introduces errors when certain elements in the dataset are
given disproportionate weight. Detecting and mitigating bias requires
careful examination of the dataset, regular analysis, and implementing
Concept Learning
▪ Concept learning, as a broader term, includes both case-based and instance-
based learning.
▪ concept learning involves the extraction of general rules or patterns from
specific instances to make predictions on new, unseen data.
▪ Concept learning in machine learning is not confined to a single pattern; it
spans various approaches, including rule-based learning, neural networks,
decision trees, and more. The process of concept learning in machine
learning involves iterative refinement. The model learns from examples,
refines its understanding of the underlying concepts, and continually updates
Concept Learning
Example: “EnjoySport”
• Suppose want to learn target concept days on which Fred enjoys his favorite
water sport
• Input is a set of examples, one per day– describing the day in terms of a set of
attributes– indicating (yes/no) whether Fred enjoyed his sport that day
Concept Learning
• Task: learn to predict the value of Enjoy Sport for an arbitrary day, given values
of other attributes
• Suppose hypotheses take form of conjunctions of constraints on instance
attributes– e.g. specify allowed values of:
Sky, Temp, Humid, Wind, Water, Forecast and
suppose constraints take one of three forms:
– ?–any value acceptable
– Specified value– specific value required, e.g. Warm for the Temp attribute
– 0– no value acceptable
Concept Learning
H= hypothesis Consistent
List-Then-Eliminate algorithm
List-Then-Eliminate algorithm
Example:
F1 – > A, B
F2 – > X, Y
Here F1 and F2 are two features (attributes) with two possible values for
each feature or attribute.
Instance Space: (A, X), (A, Y), (B, X), (B, Y) – 4Examples
Hypothesis Space: (A, X), (A, Y), (A, ø), (A, ?), (B, X), (B, Y), (B, ø),
(B, ?), (ø, X), (ø, Y), (ø, ø), (ø, ?), (?, X), (?, Y), (?, ø), (?, ?) – 16
Hypothesis
Semantically Distinct Hypothesis : (A, X), (A, Y), (A, ?), (B, X), (B, Y),
Inductive bias
What is Inductive Bias?
Inductive bias is the set of assumptions or preferences that a learning algorithm
uses to make predictions beyond the data it has been trained on.
Without inductive bias, machine learning algorithms would be unable to
generalize from training data to unseen situations, as the possible hypotheses or
models could be infinite.
Inductive bias
What is Inductive Bias?
Inductive bias
in a classification problem, if the model is trained on data that suggests a linear
relationship between features and outcomes, the inductive bias of the model
might favor a linear hypothesis. This preference guides the model to choose
simpler, linear relationships rather than complex, nonlinear ones, even if such
relationships might exist in the data.
Examples:
•Inductive bias in decision trees: A preference for shorter trees with fewer splits.
•Inductive bias in linear regression: The assumption that the data follows a linear
trend.
Inductive bias
Types of Inductive Bias
1. Language Bias: Language bias refers to the constraints placed on the
hypothesis space, which defines the types of models a learning algorithm can
consider.
2. Search Bias: Search bias refers to the preferences that an algorithm has when
selecting hypotheses from the available options.
3. Algorithm-Specific Biases: Certain algorithms have specific biases based on
their structure:
•Linear Models: Assume that the data has linear relationships.
•k-Nearest Neighbors (k-NN): Assumes that similar data points exist in close
proximity.
•Decision Trees: Typically biased towards choosing splits that result in the most
homogeneous subgroups.
ThankYou
www.paruluniversi
ty.ac.in