0% found this document useful (0 votes)
14 views35 pages

03-Introduction To Machine Learning - DNN

Uploaded by

waqarkhan03109
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
14 views35 pages

03-Introduction To Machine Learning - DNN

Uploaded by

waqarkhan03109
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 35

Introduction to Machine Learning

Introduction to Machine Learning


Learning process
Training Data

Learning
Algorithm

Model
Parameters

Objective
Function

Optimization
Process

Evaluation
Introduction to Machine Learning
Learning or Training?
Introduction to Machine Learning
Let’s Test Your Learning
Introduction to Machine Learning
Supervised Learning
Introduction to Machine Learning
Think About It:

• Learning to categorize different objects is the only kind of


learning?

• What if you have access to objects but no body is supervising


you about their classes/categories/labels?

• What is the best that you can do in the absence of a supervisor?


Introduction to Machine Learning
Unsupervised Learning
No labels
Introduction to Machine Learning
So Far…
Introduction to Machine Learning
Reinforcement Learning
Introduction to Machine Learning
It seems like easy to learn to categorize or to group
different objects. We do it every time!

Why this is harder


for machines?
Introduction to Machine Learning
Importance and future of machine learning

➔ History of machine learning


• Arthur Samuel of IBM developed a computer program for playing checkers in the 1950s. Arthur

Samuel first came up with the phrase “Machine Learning” in 1952.

• In 1957, Frank Rosenblatt – at the Cornell Aeronautical Laboratory – combined Donald Hebb’s model

of brain cell interaction with Arthur Samuel’s Machine Learning efforts and created the perceptron .

➔ Most widely used branch of computer science nowadays(google)


Introduction to Machine Learning
Why this is an era of machine learning

➔ Powerful machines that can handle computations quickly


➔ Availability of huge amount of data
➔ Advancement of technology and knowledge among people
Introduction to Machine Learning
Terminologies
• Training data • Probability distribution
• Testing data • Curse of dimensionality
• Validation data • Accuracy
• Outliers • Error, Loss, Risk
• Model • Optimization
• Training a model • Generalization
• Over fitting • Validation and cross validation
• Under fitting • Data Snooping
• Parameters • SSS problems
• Hyper Parameters • One shot learning
• Labels
• Features
• Dimensions
Introduction to Machine Learning
Dataset

➔ A data set (or dataset) is a collection of data.

➔ Dataset is a table, where every column of a dataset


represents values of a particular variable, and each
row corresponds to a given record of the dataset.

➔ Each value in the dataset is regarded as a datapoint

➔ The last column of data usually contains labels


Introduction to Machine Learning
Label
➔ A label or target is referred as the output of the data.
➔ A labelled dataset contains label which can be any output to classify the data such as cats or dogs, 0s or 1s.
➔ When a model is trained it predicts the labels of the data given to it also known as classes
➔ In machine learning, if labels are not in numeric form, then we convert them into numeric form
➔ For example Apple=0, Pear=1, etc
Introduction to Machine Learning
Features

➔ A feature is an individual measurable property or characteristic of a phenomenon being observed.


➔ Previously we used the term data points, in machine learning data points are formed by features.
➔ A feature is a finite number which is observed by the observer
➔ There are a lot of feature extraction techniques available
➔ Performance of Model depends a lot on the features that we have selected
Introduction to Machine Learning
Splitting the data

➔ Training data

➔ Testing data

➔ Validation data
Introduction to Machine Learning
Training data

➔ A machine learns from data. It finds relationships, and patterns from data.

➔ The data provided to the machine to learn and train itself is called training data.
Introduction to Machine Learning
Testing data

➔ Once the machine is trained by using training data, in order to test the machine if it is working fine or not, we use
another set of data which should not be the same data on which the model was trained,known as testing data
Introduction to Machine Learning
Outliers

➔ In the dataset there might be some data points that differ from all other data points
➔ Outliers are normally excluded from the dataset.
➔ They can be identified by visualizing the dataset
Introduction to Machine Learning
Model

➔ A machine learning model is a mathematical equation or expression that tries to fit the data and learn to
predict the unseen data
➔ Samples are encoded as being vectors with real values
➔ After encoding, every sample is really a point in some feature space
➔ Model is a function in the feature space
➔ Dimensions
➔ Parameters
➔ Hyperparameters
Introduction to Machine Learning
Training a model

➔ The process of trying to fit the training data into a model through a machine learning algorithm to achieve a
pattern in the data for predicting an unseen data is known as training a model
➔ Finding the parameters of the model that best capture the pattern of the data
Introduction to Machine Learning
Cost, Error, Loss, Risk, Accuracy
Introduction to Machine Learning
Confusion Matrix, Accuracy
Introduction to Machine Learning
Confusion Matrix, Accuracy
• True Positive: The model has predicted yes, and the actual value
was also true.
• False Positive: The model has predicted Yes, but the actual value
was No.
• False Negative: The model has predicted no, but the actual value
was Yes.
• True Negative: The model has given prediction No, and the real or
actual value was also No.
Introduction to Machine Learning
Accuracy
We can perform various calculations for the model, such as
the model accuracy, using this Matrix. These calculations
are give below:
Accuracy:
• It gives you the overall accuracy of the Model.
• To calculate accuracy, use the following formula:
Introduction to Machine Learning
Recall, Precision
Recall:
• Recall tells us How many of the actual positive cases we were able
to predict correctly with our Model.

Precision:
• Precision tells you how many of the correctly predicted cases
actually turned out to be positive.
Introduction to Machine Learning
Specificity, F1-Score
Specificity:
Specificity is the proportion of actual negative cases that are correctly
identified by the model.

F1-Score:
F1 score is the harmonic mean of precision and recall, providing a balance
between the two metrics.
Introduction to Machine Learning

Actual / Predicted Spam (Positive) Not Spam (Negative)

Spam (Positive) 60 (TP) 20 (FN)

Not Spam (Negative) 20 (FP) 100 (TN)


Introduction to Machine Learning
Overfitting, Underfitting, Just Right/Optimum
Introduction to Machine Learning
Validation and Cross-Validation
Introduction to Machine Learning
Importance of data in machine learning

➔ Formats of data
◆ Structured data
● Labeled data
● Unlabeled data
◆ Unstructured data

➔ How to choose the best format of data


Introduction to Machine Learning
Data Encoding and Preprocessing

➔ Images
➔ Videos
➔ Audio
➔ Text
➔ One Hot encoding
➔ Data standardization
Introduction to Machine Learning
A general flow of a typical Machine learning project
➔ Data collection
➔ Feature extraction
➔ Data preprocessing
➔ Model training
➔ Testing
➔ Validation
➔ Repeat/Happy Ending

You might also like