E-Notes 34758 Content Document 20250415115803AM
E-Notes 34758 Content Document 20250415115803AM
a) Regression:-
Regression algorithms are used if there is a relationship between the input
variable and the output variable.
It is used for the prediction of continuous variables, such as Weather
forecasting, Market Trends, changes in temperature or fluctuations in electricity
demand etc.
some popular Regression algorithms which come under supervised learning:
o Linear Regression
o Regression Trees
o Non-Linear Regression
o Bayesian Linear Regression
o Polynomial Regression
b) Classification:
Classification techniques is a predict discrete responses.
Medical diagnosis:
• It is very common to use supervised algorithms in the medical field for
diagnosis purposes.
• Supervised learning is integral to medical diagnosis as it enables
machines to learn from labeled data, aiding in predictive modeling,
decision support, early detection, and personalized medicine.
Bioinformatics:
• This is among the most widely used Supervised Learning applications,
and we all use it regularly.
• Bioinformatics is the study of how individuals retain biological
knowledge such as fingerprints, eye texture, earlobes, and so on.
• Mobile phones are now clever enough to comprehend our biological data
and then verify us in order to increase system security.
object recognition for the vision:
• This type of software is utilized when you have to define anything.
• You have a big dataset that you utilize to train the algorithm, and it can
recognize a new object using this.
6) Differences between Regression and classification.
d) Random Forest:
Description:Random Forest is an ensemble method that consists of multiple
decision decissiontrees.it improves prediction accuracy and reduces overfitting
by aggregating the predictions of individual trees.
Advantages: Robust to overfitting, handles high-dimensional data well.
Application: Credit risk analysis, image classification.
f) Neural Networks:
Description: Neural networks are deep learning classifiers that consist of
interconnected layers of nodes. They learn complex patterns in the data through
training with back propagation.
Advantages: Capable of learning intricate patterns, suitable for large datasets.
Application: Image recognition, speech recognition.
c) Ridge Regression:
Description: Ridge regression is a regularized form of linear regression that
adds a penalty term to the cost function to prevent over fitting by shrinking the
coefficients.
Advantages: Handles multicollinearity, reduces model complexity.
Application: Stock price prediction, risk analysis.
d) Lasso Regression:
Description: Lasso regression is another regularized linear regression technique
that uses the L1 norm penalty for feature selection by shrinking some
coefficients to zero.
Advantages: Feature selection, interpretable models.
Application: Marketing spend optimization, medical cost prediction.
a) linear regression :
Linear regression is one of the easiest and most popular Machine Learning
algorithms. It is a statistical method that is used for predictive analysis. Linear
regression makes predictions for continuous/real or numeric variables such as
sales, salary, age, product price, etc.
Linear regression algorithm shows a linear relationship between a
dependent (y) and one or more independent (x) variables, hence called as linear
regression. Since linear regression shows the linear relationship, which means it
finds how the value of the dependent variable is changing according to the value
of the independent variable.
The linear regression model provides a sloped straight line representing the
relationship between the variables. Consider the below image:
b) logistic regression
Logistic regression is one of the most popular Machine Learning
algorithms, which comes under the Supervised Learning technique. It is
used for predicting the categorical dependent variable using a given set of
independent variables.
o Logistic regression predicts the output of a categorical dependent variable.
Therefore the outcome must be a categorical or discrete value. It can be
either Yes or No, 0 or 1, true or False, etc. but instead of giving the exact
value as 0 and 1, it gives the probabilistic values which lie between 0
and 1.
o Logistic Regression is much similar to the Linear Regression except that
how they are used. Linear Regression is used for solving Regression
problems, whereas Logistic regression is used for solving the
classification problems.
o In Logistic regression, instead of fitting a regression line, we fit an "S"
shaped logistic function, which predicts two maximum values (0 or 1).
o The curve from the logistic function indicates the likelihood of something
such as whether the cells are cancerous or not, a mouse is obese or not
based on its weight, etc.
o Logistic Regression is a significant machine learning algorithm because it
has the ability to provide probabilities and classify new data using
continuous and discrete datasets.
o Logistic Regression can be used to classify the observations using different
types of data and can easily determine the most effective variables used for
the classification. The below image is showing the logistic function:
o In Logistic Regression y can be between 0 and 1 only, so for this let's divide
the above equation by (1-y):
o But we need range between -[infinity] to +[infinity], then take logarithm
of the equation it will become:
Bayes' Theorem:
o Bayes' theorem is also known as Bayes' Rule or Bayes' law, which is used
to determine the probability of a hypothesis with prior knowledge. It
depends on the conditional probability.
o The formula for Bayes' theorem is given as:
Where,
P(A|B) is Posterior probability: Probability of hypothesis A on the observed
event B.
P(B|A) is Likelihood probability: Probability of the evidence given that the
probability of a hypothesis is true.
P(A) is Prior Probability: Probability of hypothesis before observing the
evidence.
P(B) is Marginal Probability: Probability of Evidence.
0 Rainy Yes
1 Sunny Yes
2 Overcast Yes
3 Overcast Yes
4 Sunny No
5 Rainy Yes
6 Sunny Yes
7 Overcast Yes
8 Rainy No
9 Sunny No
10 Sunny Yes
11 Rainy No
12 Overcast Yes
13 Overcast Yes
Frequency table for the Weather Conditions:
Weather Yes No
Overcast 5 0
Rainy 2 2
Sunny 3 2
Total 10 5
Likelihood table weather condition:
Weather No Yes
Rainy 2 2 4/14=0.29
Sunny 2 3 5/14=0.35
Ex:Lab program 9