Introduction of Machine Learning
Introduction of Machine Learning
Learning
Asst.Prof. S.B.Mehta
Computer Science and Engineer
Basics :
Data (Input)
Traditional Output
Program Program
Data (Input)
Program
Machine Learning
Output
Basics :
• It work , just like humans do! First, we receive the knowledge about a
certain thing and then keeping this knowledge in mind, we are able to
identify the thing in the future. Also, past experiences help us in
taking decisions accordingly in the future. Our brain trains itself by
identifying the features and patterns in knowledge/data received, thus
enabling itself to successfully identify or distinguish between various
things.
2. Training a model:
3. Evaluating the model:
4. Improving the performance
• Wide Applications: ML can be helpful for those who are in the field of e-
commerce or the healthcare providers
Presented by : Prof. S.B.Mehta
Disadvantages of ML
• Data acquisition: In the process of machine learning, a large amount
of data is used in the process of training and learning. Many times we face
a situation where we find an imbalance in data which leads to poor
accuracy of models
• Time-consuming: Larger the volume of data, the time to learn from
data and process it also increases
• Algorithm Selection: A Machine Learning problem can implement
various algorithms to find a solution. It is a manual and tedious task to run
models with different algorithms and identify the most accurate algorithm
based on the results
• High error susceptibility
Disadvantages:
oSupervised learning models are not suitable for handling the complex tasks.
oSupervised learning cannot predict the correct output if the test data is different from
oIn supervised learning, we need enough knowledge about the classes of object.
o K-means clustering
o Hierarchal clustering
o Anomaly detection
o Neural Networks
o Principle Component Analysis
o Independent Component Analysis
o Apriori algorithm
o Singular value decomposition
Disadvantages:
input data is not labeled, and algorithms do not know the exact output in
advance.
Definition The Machine learns The Machine is trained An agent interacts with its
by using labeled data on unlabeled data environment by
without aby guidance performing actions and
learning from errors or
rewards
Type of Regression and Association and Reward based
Problems Classification Clustering
Type of Data Labeled Data Unlabeled data No Predefined data
Training External supervision No Supervision No Supervision
Approach Maps the labeled to Understand patterns & Fallow the trial and error
inputs to the known discovers the output method
outputs
Application Fraud Detection, Text mining, Face Gaming, Inventory
Email Spam Recognition, Image management, Finance
Detection, Image Recognition, Big Data Sector, Robot navigation
Classification, Visualization
Diagnostics, Score
Prediction
Presented by : Prof. S.B.M ehta
Hypothesis Space:
Hypothesis space is the set of all the possible legal hypothesis.
This is the set from which the machine learning algorithm would
determine the best possible (only one) which would best describe the
target function or the outputs.
1. Holdout
2. K-Fold Cross Validation
3. LOOCV (Leave One Out Cross Validation):
2 E2
3 E3
Y= b0+b1X+ ε
Or Y = mX+b
Here,
Y= Dependent Variable (Target Variable or label to data i.e output data)
X= Independent Variable (predictor Variable or input Training Data)
b0= intercept of the line (Gives an additional degree of freedom)
b1 = Linear regression coefficient (scale factor to each input value).
ε = random error (For a good model it will be negligible)
Step-1: Begin the tree with the root node, says S, which contains the
complete dataset.
Step-2: Find the best attribute in the dataset using Attribute
attribute.
Step-5: Recursively make new decision trees using the subsets of
• C4.5: This algorithm is the successor of the ID3 algorithm. This algorithm uses
either Information gain or Gain ratio to decide upon the classifying attribute. It
is a direct improvement from the ID3 algorithm as it can handle both
continuous and missing attribute values.
Alternatively,
Here Entropy(S) represents the entropy of the dataset and the second
term on the right is the weighted entropy of the different possible
classes obtain after the split.
Presented by : Prof. S.B.Mehta
Iterative Dichotomiser 3 (ID3) Algorithm:
algorithms.
Disadvantages:
To Avoid Overfitting
1. Cross-Validation
2. Training With More Data
3. Removing Features
4. Early Stopping
5. Regularization
6. Ensembling