[go: up one dir, main page]

0% found this document useful (0 votes)
30 views30 pages

Course - Machine Learning Part 1 Batch 2025

Uploaded by

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

Course - Machine Learning Part 1 Batch 2025

Uploaded by

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

8/18/25, 11:41 PM Course: Machine Learning Part 1 Batch 2025

Machine Learning Part 1 Batch 2025


Dashboard / My courses / Machine Learning Part 1 Batch 2025

Your progress 

Course Guidelines
Machine learning (ML) is the study of computer algorithms that can improve automatically through experience with the help of data. It is seen
as a sub-domain of Artificial Intelligence. As the name suggests, it gives computers an ability to learn. Machine learning algorithms build a
model based on subset of data called as training data, to make predictions or decisions without explicitly programmed instructions. Machine
learning algorithms are used in a wide variety of applications such as in stock market trading, online fraud detection, medicine, email filtering,
speech recognition, recommendation engines, computer vision, sentiment analysis, language translation, customer segmentation diagnostic
analysis etc.

In this course, you will learn Machine learning (ML) which is the study of computer algorithms that can improve automatically through
experience with the help of data.

Questions and Clarifications

You may send all your training course related questions to learning@rudderanalytics.com

It is recommended to specify your questions clearly and in a detailed manner with screenshots if feasible, so that trainers can clarify and help
better.

You must send your questions well in advance as it might take two or more days to respond to your questions.

Resources

Course resources contain material important in progressing in the course. This may contain help documents, external references etc. It is
advised to visit the resources section in each course before proceeding to assignments.

Instructions for Assignments:

Throughout this course, we will be using Google Colab Python notebooks.

Google Colab is a Google product which allows developers to write and execute Python code through their browser. Google Colab is widely
used for machine learning and deep learning tasks.

Follow the following documentation/blogs to understand more about Google Colab.

https://www.tutorialspoint.com/google_colab/index.htm

https://towardsdatascience.com/4-reasons-why-you-should-use-google-colab-for-your-next-project-b0c4aaad39ed

- Please note that you will need to use Google Colab notebooks for performing assignments and submit the notebook files with ipynb
extension.

- For the assignments, you are expected to divide each logical subtask into a separate cell.

- Add headings/titles and proper text explaining what each cell is doing. The code should be neat, readable and should have code comments.

In this course, we will be using scikit learn python library to implement assignments.

- Scikit learn official documentation

https://learning.rudderanalytics.com/course/view.php?id=148 1/30
8/18/25, 11:41 PM Course: Machine Learning Part 1 Batch 2025

https://scikit-learn.org/stable/modules/classes.html

Refer to the above document as needed.

All the very best!

Chapter 1. Introduction to Machine Learning


1.1 Introduction to Pandas
Pandas is a fast, powerful, flexible and easy to use open source data analysis and manipulation tool, built on top of the Python programming
language.

Pandas library is used to analyze, manipulate and visualize the data.

https://pandas.pydata.org/docs/user_guide/index.html

Cover following points from the above link:

10 minutes to pandas, Intro to data structures, Essential basic functionality, IO tools, Indexing and selecting data, Merge, join, concatenate and
compare, Working with text data, Duplicate Labels, Chart Visualization, Computational tools, Group by: split-apply-combine

Try the Python code snippets for different functionalities from above link.

1.2 Numpy
NumPy is a Python library with support for large, multi-dimensional arrays and matrices, along with a large collection of high-level
mathematical functions to operate on these arrays.

NumPy library is provides important foundational tools for Machine Learning tasks. Many of its functions are very useful for performing any
mathematical or scientific calculation. As mathematics and statistics are the foundations of machine learning, most of these tasks can be
performed with the help of NumPy.

Follow following documentation and blog to learn more about how Numpy is used in Machine learning tasks. Try it on your own as you read.

- https://numpy.org/devdocs/user/absolute_beginners.html

- https://medium.com/mlpoint/numpy-for-machine-learning-211a3e58b574

1.3 Introduction to ML
Machine Learning is the field of study that gives computers the capability to learn without being explicitly programmed. ML is one of the most
exciting technologies that one would have ever come across. As it is evident from the name, it gives the computer that makes it more like
humans: The ability to learn. Machine learning is actively being used today, perhaps in many more places than one would expect.

Go through following blogs/documentations to learn more about it.

- https://www.edureka.co/blog/introduction-to-machine-learning/

- https://www.digitalocean.com/community/tutorials/an-introduction-to-machine-learning

- https://www.geeksforgeeks.org/ml-machine-learning/

Additional Reading

- https://www.geeksforgeeks.org/ml-introduction-data-machine-learning/

- https://www.geeksforgeeks.org/introduction-machine-learning/

1.3.1. Best and most commonly used Machine learning libraries used are:

- https://www.geeksforgeeks.org/best-python-libraries-for-machine-learning/

https://learning.rudderanalytics.com/course/view.php?id=148 2/30
8/18/25, 11:41 PM Course: Machine Learning Part 1 Batch 2025

1.3.2. Machine learning applications:

- https://www.geeksforgeeks.org/machine-learning-introduction/

1.3.3. Types of machine learning:

- https://www.geeksforgeeks.org/supervised-unsupervised-learning/?ref=lbp

1.3.3.1. Supervised learning

1.3.3.1.1. Introduction

- https://www.geeksforgeeks.org/ml-types-learning-supervised-learning/?ref=lbp

1.3.3.1.2 Classification

- https://www.geeksforgeeks.org/getting-started-with-classification/

- https://www.geeksforgeeks.org/basic-concept-classification-data-mining/

1.3.3.1.3. Regression

- https://www.geeksforgeeks.org/types-of-regression-techniques/

1.3.3.1.4. Classification vs Regression

- https://www.geeksforgeeks.org/ml-classification-vs-regression/

- https://www.geeksforgeeks.org/regression-classification-supervised-machine-learning/

1.3.3.2. Unsupervised learning

1.3.3.2.1. Introduction:

- https://www.geeksforgeeks.org/ml-types-learning-part-2/

1.3.3.2.2. Clustering:

- https://www.geeksforgeeks.org/clustering-in-machine-learning/

1.4 Data, ML Process and Data Pre-Processing


1.4.1. Types of data in Machine learning.

First step in studying about Machine learning is to learn about data and it’s types. In order to apply correct machine learning algorithm, we
must understand the data first. Once we have a clear understanding of data, we can then apply necessary transformations to make it ready for
Machine learning algorithms, train it and use the model effectively.

Machine learning helps us find patterns in data. We then use them to make predictions about new data points. To get those predictions right,
we must learn about data in the data set and transform it correctly.

- https://pianalytix.com/data-types-in-machine-learning/

- https://www.analyticsvidhya.com/blog/2021/06/complete-guide-to-data-types-in-statistics-for-data-science/

1.4.2. ML process

In this section, we will explore various stages of machine learning process.

Machine learning process consists of roughly following stages.

1. Data collection - Collect raw data from various data sources.

2. Data understanding - Understand the data. Understand what each attribute represents and the relationship between the attributes.

https://learning.rudderanalytics.com/course/view.php?id=148 3/30
8/18/25, 11:41 PM Course: Machine Learning Part 1 Batch 2025

3. Data cleaning and transformation - Also known as data pre-processing step. Prepare and enhance data to make it ready for machine
learning model.

4. Model building - Use Machine learning algorithm and train the model.

5. Model evaluation - Evaluate the model. Use one or more model evaluation techniques to check how model is performing.

6. Model deployment – Deploy final ML model into production environment.

Steps 2 to 5 are iterative steps. We iterate through steps 2 to 5 until we find the model that best fits the data and solves our problem.

Follow following documentation/blogs to learn more about these stages.

- https://www.analyticsvidhya.com/blog/2020/12/understand-machine-learning-and-its-end-to-end-process/

- https://centricconsulting.com/blog/machine-learning-a-quick-introduction-and-five-core-steps/

1.4.3. Data pre-processing

- https://www.geeksforgeeks.org/data-preprocessing-machine-learning-python/

- https://www.geeksforgeeks.org/data-cleansing-introduction/

- https://www.analyticsvidhya.com/blog/2021/08/data-preprocessing-in-data-mining-a-hands-on-guide/

1.4.4. Handling missing values

- https://www.analyticsvidhya.com/blog/2021/10/handling-missing-value/

1.4.5. Feature scaling

Feature scaling is a method used to normalize the range of independent variables or features of data. In data processing, it is also known as
data normalization and is generally performed during the data pre-processing step.

- https://www.analyticsvidhya.com/blog/2020/04/feature-scaling-machine-learning-normalization-standardization/

- https://towardsdatascience.com/all-about-feature-scaling-bcc0ad75cb35

1.4.6. Handling numerical data

- https://towardsdatascience.com/understanding-feature-engineering-part-1-continuous-numeric-data-da4e47099a7b

1.4.7. Handling Categorical variables

Many machine learning algorithms work only with numeric and discrete data. The following blogs explain about to deal with categorical data.

- https://machinelearningmastery.com/one-hot-encoding-for-categorical-data/

- https://towardsdatascience.com/ways-to-handle-categorical-data-before-train-ml-models-with-implementation-ffc213dc84ec

- https://www.datacamp.com/tutorial/techniques-to-handle-missing-data-values

- https://analyticsindiamag.com/a-complete-guide-to-categorical-data-encoding/

1.4.8. Normalization
- https://www.datacamp.com/tutorial/normalization-in-machine-learning

1.4.9. Discretization and Binning

https://learning.rudderanalytics.com/course/view.php?id=148 4/30
8/18/25, 11:41 PM Course: Machine Learning Part 1 Batch 2025

- https://www.geeksforgeeks.org/ml-binning-or-discretization/

1.5 Exploratory Data Analysis and Feature Engineering


Exploratory Data Analysis (EDA) is an approach to analyse the data using visual techniques. It is used to discover trends, patterns with the help
of statistical summary and graphical representations.

1.5.1. Introduction

- https://www.geeksforgeeks.org/what-is-exploratory-data-analysis/

1.5.2. Python example 1

- https://www.geeksforgeeks.org/exploratory-data-analysis-in-python-set-1/

1.5.3. Python example 2

- https://www.geeksforgeeks.org/exploratory-data-analysis-in-python-set-2/

- https://www.analyticsvidhya.com/blog/2021/04/mastering-exploratory-data-analysiseda-for-data-science-enthusiasts/

1.5.4. Feature engineering

Feature engineering is the process of selecting, manipulating, and transforming raw data into features that can be used in supervised learning
algorithms. Feature engineering, in simple terms, is the act of converting raw observations into desired features using statistical or machine
learning approaches.

- https://www.freecodecamp.org/news/feature-engineering-and-feature-selection-for-beginners/

- https://www.analyticsvidhya.com/blog/2021/03/step-by-step-process-of-feature-engineering-for-machine-learning-algorithms-in-data-
science/

- https://www.kaggle.com/kashnitsky/topic-6-feature-engineering-and-feature-selection

1.5.5. Dimensionality reduction

Dimensionality reduction, or dimension reduction, is the transformation of data from a high-dimensional space into a low-dimensional space so
that the low-dimensional representation retains some meaningful properties of the original data, ideally close to its intrinsic dimension.

- https://www.geeksforgeeks.org/dimensionality-reduction/

1.5.6. Correlation analysis

- https://medium.com/analytics-vidhya/what-is-correlation-4fe0c6fbed47

1.6 Supervised Learning Algorithms and Model Training


1.6.1. Model training and testing.

https://learning.rudderanalytics.com/course/view.php?id=148 5/30
8/18/25, 11:41 PM Course: Machine Learning Part 1 Batch 2025

Once we have pre-processed data, next step is to train the data using a machine learning algorithm and test its accuracy. So, we split our
dataset into training and testing set.

- https://realpython.com/train-test-split-python-data/

- https://towardsdatascience.com/train-test-split-and-cross-validation-in-python-80b61beca4b6

1.6.2. Classification algorithms.

Classification algorithms are used to predict a categorical class label.

- https://www.edureka.co/blog/classification-algorithms/

In this section, we will learn about 3 classification algorithms.

1.6.2.1. Decision Trees

- https://www.analyticsvidhya.com/blog/2021/08/decision-tree-algorithm/

- https://www.geeksforgeeks.org/decision-tree-introduction-example/

- https://www.geeksforgeeks.org/decision-tree/

- https://www.geeksforgeeks.org/decision-tree-implementation-python/

1.6.2.2. NB classifier

- https://www.geeksforgeeks.org/naive-bayes-classifiers/

- https://www.analyticsvidhya.com/blog/2017/09/naive-bayes-explained/

- https://www.machinelearningplus.com/predictive-modeling/how-naive-bayes-algorithm-works-with-example-and-full-code/

1.6.2.3. KNN classifier

- https://www.geeksforgeeks.org/k-nearest-neighbours/

1.7 Linear Regression


In this section, we will learn about linear regression.

Linear regression is a linear model, e.g. a model that assumes a linear relationship between the input variables (x) and the single output variable
(y). More specifically, that y can be calculated from a linear combination of the input variables (x).

Linear regression is a supervised learning algorithm which is used to predict a real and continuous value.

1.7.1. Linear Regression

- https://machinelearningmastery.com/linear-regression-for-machine-learning/

- https://www.geeksforgeeks.org/types-of-regression-techniques/

- https://www.geeksforgeeks.org/ml-linear-regression/

- https://www.statisticshowto.com/probability-and-statistics/regression-analysis/rmse-root-mean-square-error/

1.7.2. Gradient descent in Linear regression


https://learning.rudderanalytics.com/course/view.php?id=148 6/30
8/18/25, 11:41 PM Course: Machine Learning Part 1 Batch 2025

- https://www.geeksforgeeks.org/gradient-descent-in-linear-regression/

- https://www.analyticsvidhya.com/blog/2021/04/gradient-descent-in-linear-regression/

1.7.3. Linear regression example

- https://www.geeksforgeeks.org/mathematical-explanation-for-linear-regression-working/?ref=lbp

1.8 Clustering
Clustering is the task of dividing the data points into several groups such that data points in the same groups are more similar to other data
points in the same group than those in other groups. In simple words, the aim is to segregate groups with similar traits and assign them into
clusters.

Clustering is an unsupervised machine learning algorithm.

1.8.1. K-Means

K-Means Clustering is an Unsupervised Learning algorithm, which groups the unlabelled dataset into different clusters. Here K defines the
number of pre-defined clusters that need to be created in the process

- https://www.geeksforgeeks.org/clustering-in-machine-learning/

- https://www.analyticsvidhya.com/blog/2016/11/an-introduction-to-clustering-and-different-methods-of-clustering/

- https://towardsdatascience.com/understanding-k-means-clustering-in-machine-learning-6a6e67336aa1

- https://www.analyticsvidhya.com/blog/2019/08/comprehensive-guide-k-means-clustering/

- https://www.geeksforgeeks.org/elbow-method-for-optimal-value-of-k-in-kmeans/

1.9 Model Evaluation


In this section, we will learn about machine learning model evaluation.

Model Evaluation is an integral part of the model development process. It helps to find the best model that represents our data and how well
the chosen model will work in the future. Evaluating model performance with the data used for training is not acceptable in data science
because it can easily generate overoptimistic and overfitted models. Therefore, we use test data for evaluating the model.

1.9.1. Model evaluation techniques

https://learning.rudderanalytics.com/course/view.php?id=148 7/30
8/18/25, 11:41 PM Course: Machine Learning Part 1 Batch 2025

- https://www.analyticsvidhya.com/blog/2020/10/quick-guide-to-evaluation-metrics-for-supervised-and-unsupervised-machine-learning/

1.9.2. Confusion Matrix

- https://www.analyticsvidhya.com/blog/2020/04/confusion-matrix-machine-learning/

- https://www.geeksforgeeks.org/confusion-matrix-machine-learning/

1.9.3. Classification Report

- https://medium.com/@kohlishivam5522/understanding-a-classification-report-for-your-machine-learning-model-88815e2ce397

1.9.4. Cross Validation

- https://www.geeksforgeeks.org/cross-validation-machine-learning/

- https://www.analyticsvidhya.com/blog/2021/05/4-ways-to-evaluate-your-machine-learning-model-cross-validation-techniques-with-python-
code/

1.9.5. Regression Model Evaluation

- https://www.analyticsvidhya.com/blog/2021/05/know-the-best-evaluation-metrics-for-your-regression-model/

1.9.6. Clustering Evaluation

- https://scikit-learn.org/stable/modules/clustering.html#clustering-performance-evaluation

Additional Reading:
- https://medium.com/mlpoint/pandas-for-machine-learning-53846bc9a98b
- https://www.learndatasci.com/tutorials/python-pandas-tutorial-complete-introduction-for-beginners/
- https://www.mathsisfun.com/data/probability.html
- https://towardsdatascience.com/basic-probability-theory-and-statistics-3105ab637213
- https://towardsdatascience.com/probability-for-machine-learning-2cfe4aa13101
- https://www.analyticsvidhya.com/blog/2021/04/probability-theory-basics-in-machine-learning/
- https://machinelearningmastery.com/bayes-theorem-for-machine-learning/
- https://www.statisticshowto.com/probability-and-statistics/probability-main-index/bayes-theorem-problems/

- https://towardsdatascience.com/machine-learning-probability-statistics-f830f8c09326
- https://www.analyticsvidhya.com/blog/2021/07/basic-statistics-concepts-for-machine-learning-newbies/
- https://www.analyticsvidhya.com/blog/2021/07/probability-types-of-probability-distribution-functions/
- https://www.mathsisfun.com/data/standard-normal-distribution.html
-

Assignment 1

Assignment 2

Assignment 3

https://learning.rudderanalytics.com/course/view.php?id=148 8/30
8/18/25, 11:41 PM Course: Machine Learning Part 1 Batch 2025

Assignment 4

Chapter 2. Advanced Machine Learning

2.1 Hyper Parameter Tuning


In Machine Learning, hyperparameter optimization or tuning is the problem of choosing a set of optimal hyperparameters for a learning
algorithm.

A hyperparameter is a parameter whose value is used to control the learning process.

When we use best values of hyper parameters, the algorithms performs at it's best.

Go Through following links to learn more -

- https://www.analyticsvidhya.com/blog/2021/04/evaluating-machine-learning-models-hyperparameter-tuning/

- https://www.geeksforgeeks.org/hyperparameter-tuning/

- https://machinelearningmastery.com/hyperparameter-optimization-with-random-search-and-grid-search/

- https://machinelearningmastery.com/difference-between-a-parameter-and-a-hyperparameter/

2.1.1 Randomized search CV -

https://scikit-learn.org/stable/modules/generated/sklearn.model_selection.RandomizedSearchCV.html

2.1.2. Grid search CV -

https://scikit-learn.org/stable/modules/generated/sklearn.model_selection.GridSearchCV.html

2.1.2.1. Grid search cv example -

https://ai.plainenglish.io/hyperparameter-tuning-of-decision-tree-classifier-using-gridsearchcv-2a6ebcaffeda

2.2 Class Imbalance Problem


In machine learning and data science, coming across imbalanced class distribution is very common.

This is a scenario where the number of observations belonging to one class is significantly lower than those belonging to the other classes.

So this makes our classifier to work good for majority class and very poor for minority class.

We need our classifier to work best of all of the classes. So, in order to handle imbalanced data, there are multiple techniques we can use.

Go through following links to learn more about those techniques.

- https://machinelearningmastery.com/what-is-imbalanced-classification/

- https://www.chioka.in/class-imbalance-problem/

- https://www.analyticsvidhya.com/blog/2017/03/imbalanced-data-classification/

2.2.1. SMOTE

- https://machinelearningmastery.com/smote-oversampling-for-imbalanced-classification/

2.3 Classification
In this section, we will learn some more classification algorithms.
https://learning.rudderanalytics.com/course/view.php?id=148 9/30
8/18/25, 11:41 PM Course: Machine Learning Part 1 Batch 2025

2.3.1. Probabilistic vs discriminative models

- https://www.analyticsvidhya.com/blog/2021/07/deep-understanding-of-discriminative-and-generative-models-in-machine-learning/

- https://medium.com/@mlengineer/generative-and-discriminative-models-af5637a66a3

2.3.1.1. Bayesian learning -

In this section, we will learn Bayes theorem and Bayesian inference.

1. Bayes theorem

- https://machinelearningmastery.com/bayes-theorem-for-machine-learning/

- https://www.statisticshowto.com/probability-and-statistics/probability-main-index/bayes-theorem-problems/

Bayesian inference is a method of statistical inference in which Bayes' theorem is used to update the probability for a hypothesis as more
evidence or information becomes available.

2. Bayesian inference

- https://www.analyticsvidhya.com/blog/2016/06/bayesian-statistics-beginners-simple-english/

- https://towardsdatascience.com/what-is-bayesian-inference-4eda9f9e20a6

3. NB Algorithm

- https://www.turing.com/kb/an-introduction-to-naive-bayes-algorithm-for-beginners

2.3.1.2. Logistic regression

Logistic regression is a process of modeling the probability of a discrete outcome given an input variable.

- https://www.analyticsvidhya.com/blog/2021/10/building-an-end-to-end-logistic-regression-model/

2.4 SVM
Support vector machine is a supervised machine learning algorithm used mostly for classification.

The objective of SVM algorithm is to find a hyperplane in an N-dimensional space that distinctly classifies the data points.

Go through following links to learn more about SVM.

- https://www.geeksforgeeks.org/support-vector-machine-algorithm/

- https://www.analyticsvidhya.com/blog/2021/10/support-vector-machinessvm-a-complete-guide-for-beginners/

- https://www.geeksforgeeks.org/classifying-data-using-support-vector-machinessvms-in-python/

- https://medium.com/@zxr.nju/what-is-the-kernel-trick-why-is-it-important-98a98db0961d

2.5 Ensemble learning - Combining classifiers


https://learning.rudderanalytics.com/course/view.php?id=148 10/30
8/18/25, 11:41 PM Course: Machine Learning Part 1 Batch 2025

Ensemble methods use multiple models to obtain better predictive performance than it could have obtained from any of the standalone
models.

It constructs a set of classifiers from the training data and predict class label of test records by combining the predictions made by multiple
classifiers.

- https://www.analyticsvidhya.com/blog/2015/08/introduction-ensemble-learning/

2.5.1. Bagging

In bagging, the data is divided into multiple subsets. A base model is created on each of those subsets.

The models run in parallel and independent of each other.

Final predictions are made by combining predictions from all the models.

- https://www.geeksforgeeks.org/ml-bagging-classifier/

2.5.1.1. Random Forest

- https://www.analyticsvidhya.com/blog/2021/06/understanding-random-forest/

https://learning.rudderanalytics.com/course/view.php?id=148 11/30
8/18/25, 11:41 PM Course: Machine Learning Part 1 Batch 2025

2.5.2. Boosting

Boosting is a iterative and sequential process where each subsequent model attempts to correct errors of previous model. The succeeding
models are dependent on previous models.

- https://www.analyticsvidhya.com/blog/2015/11/quick-introduction-boosting-algorithms-machine-learning/

2.5.2.1. AdaBoost

- https://www.analyticsvidhya.com/blog/2021/09/adaboost-algorithm-a-complete-guide-for-beginners/

2.6 Regression
In this section, we will learn some advance concepts about Regression.

2.6.1. Ridge and Lasso regression

Ridge and lasso regression allow you to regularize ("shrink") coefficients.

This means that the estimated coefficients are pushed towards 0, to make them work better on new data-sets("optimized for prediction").

This allows you to use complex models and avoid over-fitting at the same time.

- https://www.analyticsvidhya.com/blog/2017/06/a-comprehensive-guide-for-linear-ridge-and-lasso-regression/

https://learning.rudderanalytics.com/course/view.php?id=148 12/30
8/18/25, 11:41 PM Course: Machine Learning Part 1 Batch 2025

2.7 Unsupervised learning


In this section, we will learn some advance concepts relating to unsupervised learning.

2.7.1. Gaussian Mixture models

A Gaussian mixture model is a probabilistic model that assumes all the data points are generated from a mixture of a finite number of Gaussian
distributions with unknown parameters.

- https://www.analyticsvidhya.com/blog/2019/10/gaussian-mixture-models-clustering/#h2_7

- https://analyticsindiamag.com/all-you-need-to-know-about-gaussian-mixture-models/

Assignment 5

https://learning.rudderanalytics.com/course/view.php?id=148 13/30
8/18/25, 11:41 PM Course: Machine Learning Part 1 Batch 2025

Chapter 3. Deep Learning


3.1. Introduction to Deep learning
In this section, we will have an introduction to deep learning and where it can be used.

Deep learning is a branch of machine learning which is completely based on artificial neural networks.

- https://www.geeksforgeeks.org/introduction-deep-learning/

- https://developer.ibm.com/articles/an-introduction-to-deep-learning/

3.1.1. Machine learning vs deep learning

In this section, we will study the difference between machine learning and deep learning and their use cases.

- https://www.geeksforgeeks.org/difference-between-machine-learning-and-deep-learning/

- https://hackernoon.com/deep-learning-vs-machine-learning-a-simple-explanation-47405b3eef08

3.1.2. Deep learning applications

Deep learning has applications in almost every domain. In this section we look at some of the applications of deep learning.

- https://www.mygreatlearning.com/blog/deep-learning-applications/

3.1.3. Introduction to Neural networks

Neural networks are the backbone of machine learning algorithms. This section gives brief introduction of neural networks.

- https://www.section.io/engineering-education/introduction-to-neural-networks/

- https://www.analyticsvidhya.com/blog/2022/01/introduction-to-neural-networks/

We will cover every aspect of neural networks in detail in upcoming sections.

We will be using Tensorflow, Keras and Pytorch libraries of Python to do some hands on assignments.

3.2 Perceptron
In this section, we will learn about basics of Perceptron.

A Perceptron is an Artificial Neuron. It is the simplest possible Neural Network. It's a building block of deep neural network.

- https://www.simplilearn.com/tutorials/deep-learning-tutorial/perceptron

- https://machinelearningmastery.com/neural-networks-crash-course/

3.3 Tutorial 2
Throughout this section, we will be using Fashion MNIST dataset for tutorial.

Problem type – Basic Classification.

Dataset – Images of Fashion props.

Dataset link - https://github.com/zalandoresearch/fashion-mnist

Dataset information – The dataset contains 70,000 grayscale images in 10 categories.

https://learning.rudderanalytics.com/course/view.php?id=148 14/30
8/18/25, 11:41 PM Course: Machine Learning Part 1 Batch 2025

There are 10 categories (classes).

Each image is mapped to a single label. Since the class names are not included with the dataset, store them here to use later when plotting the
images:

1. Loading the data

Since this is an inbuilt dataset provided by Keras, we can use this shortcut to load the data.

Here, 60,000 images are used to train the network and 10,000 images to evaluate how accurately the network learned to classify images.

https://learning.rudderanalytics.com/course/view.php?id=148 15/30
8/18/25, 11:41 PM Course: Machine Learning Part 1 Batch 2025

2. Explore the data

Let’s explore the dataset.

The following shows there are 60,000 images in the training set, with each image represented as 28 x 28 pixels:

Likewise, there are 60000 labels.

Each label is between 0 to 9.

Likewise, there are 10000 test images with size 28*28.

And 10000 class labels.

3. Pre-process data

As discussed in last chapter, scale these values to a range of 0 to 1 before feeding them to the neural network model. To do so, divide the
values by 255. It's important that the training set and the testing set be preprocessed in the same way.

https://learning.rudderanalytics.com/course/view.php?id=148 16/30
8/18/25, 11:41 PM Course: Machine Learning Part 1 Batch 2025

4. Visualize the data

3.4 Building the model


In this section, we will learn about how to build and configure the model.

Building the neural network requires configuring the layers of the model, then compiling the model.

3.4.1. Setup the layers.

The basic building block of a neural network is the layer. Layers extract representations from the data fed into them.

Most of deep learning consists of chaining together simple layers. Most layers, such as tf.keras.layers.Dense, have parameters that are learned
during training.

https://learning.rudderanalytics.com/course/view.php?id=148 17/30
8/18/25, 11:41 PM Course: Machine Learning Part 1 Batch 2025

The first layer in this network, tf.keras.layers.Flatten, transforms the format of the images from a two-dimensional array (of 28 by 28 pixels) to a
one-dimensional array (of 28 * 28 = 784 pixels). Think of this layer as unstacking rows of pixels in the image and lining them up. This layer has
no parameters to learn; it only reformats the data.

After the pixels are flattened, the network consists of a sequence of two tf.keras.layers.Dense layers. These are densely connected, or fully
connected, neural layers. The first Dense layer has 128 nodes (or neurons). The second (and last) layer returns a logits array with length of 10.
Each node contains a score that indicates the current image belongs to one of the 10 classes.

The number of nodes in the output layer = number of classes.

Input layer must be created with proper input shape of images.

3.4.2. Activation function

Each layer has an activation function which calculates the output at the each node based on the inputs and weights

Go through following links to learn more about activation functions.

- https://towardsdatascience.com/activation-functions-neural-networks-1cbd9f8d91d6

- https://machinelearningmastery.com/choose-an-activation-function-for-deep-learning/

- https://www.analyticssteps.com/blogs/7-types-activation-functions-neural-network

- https://www.geeksforgeeks.org/activation-functions-neural-networks/

3.5 Model compiling

In this section, we will learn about how to compile the model and the options available.

Before the actual training starts, we need to compile the model. There are 3 important parameters that we need to configure.

Loss function —This measures how accurate the model is during training. You want to minimize this function to "steer" the model in the right
direction.
Optimizer —This is how the model is updated based on the data it sees and its loss function.
Metrics —Used to monitor the training and testing steps. The following example uses accuracy, the fraction of the images that are correctly
classified.

1. Loss function

In this section, we will go through details about loss function.

- https://machinelearningmastery.com/loss-and-loss-functions-for-training-deep-learning-neural-networks/

- https://programmathically.com/an-introduction-to-neural-network-loss-functions/

2. Optimizers

An optimizer is a function or an algorithm that modifies the attributes of the neural network, such as weights and learning rate.

Thus, it helps in reducing the overall loss and improve the accuracy.

- https://www.analyticsvidhya.com/blog/2021/10/a-comprehensive-guide-on-deep-learning-optimizers/

https://learning.rudderanalytics.com/course/view.php?id=148 18/30
8/18/25, 11:41 PM Course: Machine Learning Part 1 Batch 2025

- https://www.kdnuggets.com/2020/12/optimization-algorithms-neural-networks.html

- https://medium.com/mlearning-ai/optimizers-in-deep-learning-7bf81fed78a0

Additional Reading

- https://towardsdatascience.com/how-to-select-loss-function-and-activation-function-for-classification-problems-b7f32c724507

- https://analyticsindiamag.com/loss-functions-in-deep-learning-an-overview/

3.6 Back propagation


Before learning about how to train the model using Keras, let’s go through some theory about how the model is trained.

Feed forward network

The "forward pass" refers to calculation process, values of the output layers from the inputs data.

It's traversing through all neurons from first to last layer. A loss function is calculated from the output value

- https://www.analyticsvidhya.com/blog/2022/03/basic-introduction-to-feed-forward-network-in-deep-learning/

Weight initialization

- https://medium.com/@amarbudhiraja/towards-weight-initialization-in-deep-neural-networks-908d3d9f1e02

Back propagation

In this section, we will learn theoretical details of back propagation.

- https://www.analyticsvidhya.com/blog/2021/06/how-does-backward-propagation-work-in-neural-networks/

- https://www.watelectronics.com/back-propagation-neural-network/

- https://www.datacamp.com/tutorial/mastering-backpropagation

Mathematical calculations example

This section covers mathematical example of calculations involved in back propagation.

- https://mattmazur.com/2015/03/17/a-step-by-step-backpropagation-example/

- https://www.youtube.com/watch?v=0e0z28wAWfg

Additional Reading

- https://hmkcode.com/ai/backpropagation-step-by-step/

- https://programmathically.com/understanding-backpropagation-with-gradient-descent/

3.7 Training the model


In this section, we will explore how we can train the model and what are different options available.

Training the neural network model requires the following steps:

1. Feed the training data to the model. In this example, the training data is in the train_images and train_labels arrays.
2. The model learns to associate images and labels.
3. You ask the model to make predictions about a test set—in this example, the test_images array.
4. Verify that the predictions match the labels from the test_labels array.

https://learning.rudderanalytics.com/course/view.php?id=148 19/30
8/18/25, 11:41 PM Course: Machine Learning Part 1 Batch 2025

To start training, call the model.fit method—so called because it "fits" the model to the training data:

Various parameters available for fit method:

Details - https://www.tensorflow.org/api_docs/python/tf/keras/Model#fit

After training, the model produced 91% training accuracy.

As the model trains, the loss and accuracy metrics are displayed. This model reaches an accuracy of about 0.91 (or 91%) on the training data.

Number of epochs, batch size and learning rate are hyperparameters of a neural network. This section helps understand the role of them and
how to optimally use set their value.

- https://www.baeldung.com/cs/epoch-neural-networks

- https://deeplizard.com/learn/video/U4WB9p6ODjM

- https://www.baeldung.com/cs/learning-rate-batch-size

- https://deepchecks.com/glossary/learning-rate-in-machine-learning/

https://learning.rudderanalytics.com/course/view.php?id=148 20/30
8/18/25, 11:41 PM Course: Machine Learning Part 1 Batch 2025

Additional Reading

- https://wandb.ai/ayush-thakur/dl-question-bank/reports/What-s-the-Optimal-Batch-Size-to-Train-a-Neural-Network---VmlldzoyMDkyNDU

- https://www.educative.io/answers/learning-rate-in-machine-learning

- https://machinelearningmastery.com/understand-the-dynamics-of-learning-rate-on-deep-learning-neural-networks/

3.8 Testing and evaluation


In this section, we learn about testing, validation sets and evaluation techniques to evaluate the model.

We compare how the model performs on the test dataset.

It turns out that the accuracy on the test dataset is a little less than the accuracy on the training dataset. This gap between training accuracy and
test accuracy represents overfitting. Overfitting happens when a machine learning model performs worse on new, previously unseen inputs than
it does on the training data. An overfitted model "memorizes" the noise and details in the training dataset to a point where it negatively
impacts the performance of the model on the new data.

3.8.1. Testing and validation

Once the model is created, complied and trained, we evaluate it's performance and check if it needs to be tuned further.

3.8.2. Evaluating performance

- https://www.jeremyjordan.me/evaluating-a-machine-learning-model/
https://learning.rudderanalytics.com/course/view.php?id=148 21/30
8/18/25, 11:41 PM Course: Machine Learning Part 1 Batch 2025

- https://medium.com/cdo-by-alphaconverge/how-to-evaluate-a-neural-network-model-part-i-b1a488b327d9

- https://medium.com/cdo-by-alphaconverge/how-to-avoid-overfitting-in-neural-networks-ec2a9384103c

3.9 Strategies to avoid overfitting


In this section, we will understand the concept of overfitting and how regularization techniques help in overcoming the problem.

3.9.1. How to avoid overfitting - https://machinelearningmastery.com/introduction-to-regularization-to-reduce-overfitting-and-improve-


generalization-error/

3.9.2. Regularization

Regularization is a set of techniques that can prevent overfitting in neural networks and thus improve the accuracy of a Deep Learning model
when facing completely new data from the problem domain.

There are 2 types of regularization – L1 and L2.

L1 regularization, where the cost added is proportional to the absolute value of the weights coefficients (i.e. to what is called the "L1 norm" of
the weights).
L2 regularization, where the cost added is proportional to the square of the value of the weights coefficients (i.e. to what is called the squared
"L2 norm" of the weights). L2 regularization is also called weight decay in the context of neural networks.

L1 regularization pushes weights towards exactly zero, encouraging a sparse model. L2 regularization will penalize the weights parameters
without making them sparse since the penalty goes to zero for small weights—one reason why L2 is more common.

In tf.keras, weight regularization is added by passing weight regularizer instances to layers as keyword arguments. Add L2 weight regularization:

How to add regularization in model architecture:

- https://theaisummer.com/regularization/

3.9.3. Dropout

Dropout is one of the techniques to avoid overfitting and to improve accuracy of a Deep Learning model when facing completely new data
from the problem domain.

During training, some number of layer outputs are randomly ignored or “dropped out.”

How to add dropout in model structure:

https://learning.rudderanalytics.com/course/view.php?id=148 22/30
8/18/25, 11:41 PM Course: Machine Learning Part 1 Batch 2025

- https://machinelearningmastery.com/dropout-for-regularizing-deep-neural-networks/

- https://www.geeksforgeeks.org/dropout-in-neural-networks/

- https://medium.com/@amarbudhiraja/https-medium-com-amarbudhiraja-learning-less-to-learn-better-dropout-in-deep-machine-learning-
74334da4bfc5

3.9.4. Early stopping and callbacks

Early stopping technique stops the model training from being overfit as soon as it realizes the model is getting more generalized.

- https://machinelearningmastery.com/early-stopping-to-avoid-overtraining-neural-network-models/

- https://towardsdatascience.com/early-stopping-a-cool-strategy-to-regularize-neural-networks-bfdeca6d722e

- https://www.kdnuggets.com/2019/08/keras-callbacks-explained-three-minutes.html

3.9.5. Data Augmentation

Data augmentation is a techniques used to increase the amount of data by adding slightly modified copies of already existing data or newly
created synthetic data from existing data.

It acts as a regularizer and helps reduce overfitting when training a machine learning model.

- https://nanonets.com/blog/data-augmentation-how-to-use-deep-learning-when-you-have-limited-data-part-2/

- https://research.aimultiple.com/data-augmentation/

- https://machinelearningmastery.com/how-to-configure-image-data-augmentation-when-training-deep-learning-neural-networks/

3.9.6. Summary of improvement techniques

- https://www.analyticsvidhya.com/blog/2018/04/fundamentals-deep-learning-regularization-techniques/

Additional reading

- https://machinelearningmastery.com/how-to-reduce-generalization-error-in-deep-neural-networks-with-activity-regularization-in-keras/

3.10 Introduction to CNN

Convolutional neural networks (CNN)

A convolutional neural network (CNN) is a type of artificial neural network used in image recognition and processing that is specifically
designed to process pixel data.

In this section, we learn more about CNN, it's architecture and use cases.

- https://www.ibm.com/cloud/learn/convolutional-neural-networks

- https://www.analyticsvidhya.com/blog/2022/03/basic-introduction-to-convolutional-neural-network-in-deep-learning/
https://learning.rudderanalytics.com/course/view.php?id=148 23/30
8/18/25, 11:41 PM Course: Machine Learning Part 1 Batch 2025

C4W1L01 Computer Vision

- C4W1L01 to C4W1L11

Why Deep Learning Is Becoming So Po…


Po…

- Lecture 20 to 25

Additional reading

- https://www.geeksforgeeks.org/introduction-convolution-neural-network/

- https://www.geeksforgeeks.org/cnn-introduction-to-pooling-layer/

Convolution operation

- https://www.superdatascience.com/blogs/convolutional-neural-networks-cnn-step-1-convolution-operation

- https://machinelearningmastery.com/convolutional-layers-for-deep-learning-neural-networks/

3.11 Tutorial 3
In this tutorial, we load the dataset into test and training set and visualize the data.

The CIFAR10 dataset contains 60,000 colour images in 10 classes, with 6,000 images in each class. The dataset is divided into 50,000 training
images and 10,000 testing images. The classes are mutually exclusive and there is no overlap between them.

1. Plot the dataset

https://learning.rudderanalytics.com/course/view.php?id=148 24/30
8/18/25, 11:41 PM Course: Machine Learning Part 1 Batch 2025

3.12 Layers in CNN


In this section, we deep dive into layers on CNN and how to build a CNN model using Keras.

Layers in CNN

- https://www.analyticsvidhya.com/blog/2022/01/convolutional-neural-networkcnn/

- https://towardsdatascience.com/convolutional-neural-networks-explained-9cc5188c4939

- https://machinelearningmastery.com/pooling-layers-for-convolutional-neural-networks/

How to create a CNN:

https://learning.rudderanalytics.com/course/view.php?id=148 25/30
8/18/25, 11:41 PM Course: Machine Learning Part 1 Batch 2025

The network contains combination of Conv2D and Maxpooling layers.

As input, a CNN takes tensors of shape (image_height, image_width, color_channels), ignoring the batch size. If you are new to these
dimensions, color_channels refers to (R,G,B). In this example, you will configure your CNN to process inputs of shape (32, 32, 3), which is the
format of CIFAR images. You can do this by passing the argument input_shape to your first layer.

Add Dense layers on top

To complete the model, you will feed the last output tensor from the convolutional base (of shape (4, 4, 64)) into one or more Dense layers to
perform classification. Dense layers take vectors as input (which are 1D), while the current output is a 3D tensor. First, you will flatten (or unroll)
the 3D output to 1D, then add one or more Dense layers on top. CIFAR has 10 output classes, so you use a final Dense layer with 10 outputs.

Here is the mode summary:

Model: "sequential"

___________________________________________________________________________________________________________

Layer (type) Output Shape Param #

=================================================================

conv2d (Conv2D) (None, 30, 30, 32) 896

max_pooling2d (MaxPooling2D) (None, 15, 15, 32) 0

conv2d_1 (Conv2D) (None, 13, 13, 64) 18496

max_pooling2d_1 (MaxPooling 2D) (None, 6, 6, 64) 0

conv2d_2 (Conv2D) (None, 4, 4, 64) 36928

flatten (Flatten) (None, 1024) 0

dense (Dense) (None, 64) 65600

dense_1 (Dense) (None, 10) 650

https://learning.rudderanalytics.com/course/view.php?id=148 26/30
8/18/25, 11:41 PM Course: Machine Learning Part 1 Batch 2025

The network summary shows that (4, 4, 64) outputs were flattened into vectors of shape (1024) before going through two Dense layers.

Compile and train the model

Evaluate the model

The CNN model achieved the accuracy of 71% on test data.

Additional Reading

- https://www.geeksforgeeks.org/cnn-introduction-to-pooling-layer/

3.13 Introduction to Computer vision

Introduction to Computer Vision

https://learning.rudderanalytics.com/course/view.php?id=148 27/30
8/18/25, 11:41 PM Course: Machine Learning Part 1 Batch 2025

Computer vision is the field of computer science that focuses on creating digital systems that can process, analyze, and make sense of visual
data (images or videos) in the same way that humans do.

In this section, we get a brief introduction to Computer vision, it's use cases and applications.

- https://www.ibm.com/in-en/topics/computer-vision

- https://machinelearningmastery.com/what-is-computer-vision/

- https://www.datacamp.com/blog/what-is-computer-vision

- https://www.datacamp.com/blog/yolo-object-detection-explained

- https://www.datacamp.com/tutorial/opencv-tutorial

4. Additional Reading
4.1 The following YouTube playlist covers most of the Machine learning concepts that have been covered in this course. Go through necessary
corresponding videos as and when required.

A Gentle Introduction to Machine Lear…


Lear…

4.2 NumPy is a Python library with support for large, multi-dimensional arrays and matrices, along with a large collection of high-level
mathematical functions to operate on these arrays.

NumPy library provides important foundational tools for Machine Learning tasks. Many of its functions are very useful for performing any
mathematical or scientific calculation. As mathematics and statistics are the foundations of machine learning, most of these tasks can be
performed with the help of NumPy.

Installation

Install the NumPy library.

You can refer the NumPy’s official installation guide:

https://numpy.org/install/

QuickStart

Go through NumPy’s official quick start and absolute basics document:

https://numpy.org/doc/2.0/user/quickstart.html

https://learning.rudderanalytics.com/course/view.php?id=148 28/30
8/18/25, 11:41 PM Course: Machine Learning Part 1 Batch 2025

https://numpy.org/doc/2.0/user/absolute_beginners.html#

Fundamentals

Resources:

https://youtu.be/awP79Yb3NaU?si=EWGmVZp-h5KD7Bj9

Fundamentals document:

Go through NumPy’s official fundamentals document:

https://numpy.org/doc/2.0/user/basics.html#

NumPy for Machine Learning

Follow the following documentation and blog to learn more about how NumPy is used in Machine learning tasks. Try it on your own as you
read.

1. https://medium.com/mlpoint/numpy-for-machine-learning-211a3e58b574

2. https://madewithml.com/courses/foundations/numpy/

4.3 Machine Learning is the field of study that gives computers the capability to learn without being explicitly programmed. ML is one of the
most exciting technologies that one would have ever come across. As it is evident from the name, it gives the computer that makes it more like
humans: The ability to learn. Machine learning is actively being used today, perhaps in many more places than one would expect.

Go through following blogs/documentations to learn more about it.

- https://www.edureka.co/blog/introduction-to-machine-learning/

- https://www.digitalocean.com/community/tutorials/an-introduction-to-machine-learning

- https://towardsdatascience.com/introduction-to-machine-learning-for-beginners-eed6024fdb08

- https://www.geeksforgeeks.org/ml-machine-learning/

- https://www.geeksforgeeks.org/ml-introduction-data-machine-learning/

- https://www.geeksforgeeks.org/introduction-machine-learning/

4.3.1. Best and most commonly used Machine learning libraries used are:

- https://www.geeksforgeeks.org/best-python-libraries-for-machine-learning/

4.3.2. Machine learning applications:

- https://www.geeksforgeeks.org/machine-learning-introduction/

4.3.3. Types of machine learning:

- https://www.geeksforgeeks.org/supervised-unsupervised-learning/?ref=lbp

4.3.3.1. Supervised learning

4.3.3.1.1. Introduction

- https://www.geeksforgeeks.org/ml-types-learning-supervised-learning/?ref=lbp

4.3.3.1.2. Classification

- https://www.geeksforgeeks.org/getting-started-with-classification/

- https://www.geeksforgeeks.org/basic-concept-classification-data-mining/

https://learning.rudderanalytics.com/course/view.php?id=148 29/30
8/18/25, 11:41 PM Course: Machine Learning Part 1 Batch 2025

4.3.3.1.3. Regression

- https://www.geeksforgeeks.org/types-of-regression-techniques/

4.3.3.1.4. Classification vs Regression

- https://www.geeksforgeeks.org/ml-classification-vs-regression/

- https://www.geeksforgeeks.org/regression-classification-supervised-machine-learning/

4.3.3.2. Unsupervised learning

4.3.3.2.1. Introduction:

- https://www.geeksforgeeks.org/ml-types-learning-part-2/

4.3.3.2.2. Clustering:

- https://www.geeksforgeeks.org/clustering-in-machine-learning/

https://learning.rudderanalytics.com/course/view.php?id=148 30/30

You might also like