Course - Machine Learning Part 1 Batch 2025
Course - 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.
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.
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.
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.
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
https://pandas.pydata.org/docs/user_guide/index.html
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.
- 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
- https://www.geeksforgeeks.org/machine-learning-introduction/
- https://www.geeksforgeeks.org/supervised-unsupervised-learning/?ref=lbp
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/
- https://www.geeksforgeeks.org/ml-classification-vs-regression/
- https://www.geeksforgeeks.org/regression-classification-supervised-machine-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/
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
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.
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.
- 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/
- 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/
- https://www.analyticsvidhya.com/blog/2021/10/handling-missing-value/
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
- https://towardsdatascience.com/understanding-feature-engineering-part-1-continuous-numeric-data-da4e47099a7b
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
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.1. Introduction
- https://www.geeksforgeeks.org/what-is-exploratory-data-analysis/
- https://www.geeksforgeeks.org/exploratory-data-analysis-in-python-set-1/
- 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/
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
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/
- https://medium.com/analytics-vidhya/what-is-correlation-4fe0c6fbed47
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
- https://www.edureka.co/blog/classification-algorithms/
- 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/
- https://www.geeksforgeeks.org/k-nearest-neighbours/
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.
- 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/
- https://www.geeksforgeeks.org/gradient-descent-in-linear-regression/
- https://www.analyticsvidhya.com/blog/2021/04/gradient-descent-in-linear-regression/
- 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.
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/
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.
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/
- https://www.analyticsvidhya.com/blog/2020/04/confusion-matrix-machine-learning/
- https://www.geeksforgeeks.org/confusion-matrix-machine-learning/
- https://medium.com/@kohlishivam5522/understanding-a-classification-report-for-your-machine-learning-model-88815e2ce397
- 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/
- https://www.analyticsvidhya.com/blog/2021/05/know-the-best-evaluation-metrics-for-your-regression-model/
- 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
When we use best values of hyper parameters, the algorithms performs at it's best.
- 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/
https://scikit-learn.org/stable/modules/generated/sklearn.model_selection.RandomizedSearchCV.html
https://scikit-learn.org/stable/modules/generated/sklearn.model_selection.GridSearchCV.html
https://ai.plainenglish.io/hyperparameter-tuning-of-decision-tree-classifier-using-gridsearchcv-2a6ebcaffeda
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.
- 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
- 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
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
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.
- 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
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.
Final predictions are made by combining predictions from all the models.
- https://www.geeksforgeeks.org/ml-bagging-classifier/
- 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.
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
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
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/
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
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/
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 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.
https://learning.rudderanalytics.com/course/view.php?id=148 14/30
8/18/25, 11:41 PM Course: Machine Learning Part 1 Batch 2025
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:
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
The following shows there are 60,000 images in the training set, with each image represented as 28 x 28 pixels:
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
Building the neural network requires configuring the layers of the model, then compiling the model.
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.
Each layer has an activation function which calculates the output at the each node based on the inputs and weights
- 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/
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
- 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/
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
- 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
- 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/
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:
Details - https://www.tensorflow.org/api_docs/python/tf/keras/Model#fit
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/
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.
Once the model is created, complied and trained, we evaluate it's performance and check if it needs to be tuned further.
- 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.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.
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:
- 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.”
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
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
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/
- 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/
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 to C4W1L11
- 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.
https://learning.rudderanalytics.com/course/view.php?id=148 24/30
8/18/25, 11:41 PM Course: Machine Learning Part 1 Batch 2025
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/
https://learning.rudderanalytics.com/course/view.php?id=148 25/30
8/18/25, 11:41 PM Course: Machine Learning Part 1 Batch 2025
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.
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.
Model: "sequential"
___________________________________________________________________________________________________________
=================================================================
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.
Additional Reading
- https://www.geeksforgeeks.org/cnn-introduction-to-pooling-layer/
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.
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
https://numpy.org/install/
QuickStart
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:
https://numpy.org/doc/2.0/user/basics.html#
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.
- 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/
- https://www.geeksforgeeks.org/machine-learning-introduction/
- https://www.geeksforgeeks.org/supervised-unsupervised-learning/?ref=lbp
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/
- https://www.geeksforgeeks.org/ml-classification-vs-regression/
- https://www.geeksforgeeks.org/regression-classification-supervised-machine-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