Summer Training Report by Rishu
Summer Training Report by Rishu
Submitted by
RISHU PRASHANT
Enrollment Number: 05714802821
RISHU PRASHANT
Enrollment No: 05714802821
Electronics and Communication Engineering
5E3
ACKNOWLEDGEMENT
I would like to express my sincere gratitude to Internshala Trainings for providing an invaluable
learning experience through their comprehensive course on machine learning. This journey has been
nothing short of transformative, and I am profoundly thankful for the knowledge, skills, and insights
gained during this immersive program.
The course structure, designed meticulously by Internshala Trainings, not only covered the theoretical
foundations of machine learning but also provided practical, hands-on applications that have been
instrumental in enhancing my understanding of this dynamic field. The real-world projects, industry-
relevant content, and the guidance of experienced instructors have collectively contributed to a holistic
learning experience.
RISHU PRASHANT
5E123/E3
ABSTRACT
Machine Learning (ML) is a transformative paradigm within the broader field of artificial intelligence,
focusing on the development of algorithms and models that enable systems to learn and make
predictions or decisions without explicit programming. This abstract provides a concise overview of
key aspects within the expansive landscape of machine learning.
TABLE OF CONTENTS
2. Technology implemented 09
3. Result Discussion 20
4. Project Report 22
INTRODUCTION
1.1 INTRODUCTION
Machine Learning (ML) stands at the forefront of the technological revolution, acting as the catalyst
for transformative advancements in artificial intelligence. At its core, ML is a discipline that
empowers systems to autonomously learn from data, identify patterns, and make informed decisions
without explicit programming. This paradigm shift has not only reshaped our approach to problem-
solving but has also ushered in a new era of intelligent applications across various domains.
Machine Learning (ML) is a subset of artificial intelligence (AI) that focuses on the development of
algorithms and models that enable computer systems to learn and improve from experience. The primary
goal of machine learning is to allow machines to automatically learn patterns, make decisions, and
improve their performance over time without being explicitly programmed for each task. In essence, it
empowers computers to learn from data and adapt their behavior accordingly.
Machine Learning works by enabling computer systems to automatically learn and improve from
experience without being explicitly programmed. The process involves several key steps, from data
collection and preprocessing to training and deployment. Here's a simplified overview of how
machine learning works:
1
1. Data Collection:
The first step in any machine learning project is to gather relevant data. This data could include
examples of input-output pairs for supervised learning or unlabeled data for unsupervised
learning. The quality and quantity of the data play a crucial role in the success of the model.
2. Data Preprocessing:
Raw data is often messy and may contain missing values, outliers, or irrelevant information. Data
preprocessing involves cleaning and transforming the data to make it suitable for training. This
step may also include normalization, scaling, and encoding categorical variables.
3. Feature Selection/Engineering:
Features are the input variables that the model uses to make predictions. Feature selection
involves choosing the most relevant features, while feature engineering may include creating new
features or transforming existing ones to improve the model's performance.
4. Choosing a Model:
Based on the nature of the task (classification, regression, clustering, etc.), a suitable machine
learning algorithm is selected. Common algorithms include decision trees, support vector
machines, neural networks, and more.
6. Model Evaluation:
The performance of the model is evaluated using a separate dataset that it hasn't seen before
(testing or validation set). Various metrics, such as accuracy, precision, recall, and F1 score, are
used to assess how well the model generalizes to new, unseen data.
7. Fine-Tuning:
2
Based on the evaluation results, the model may be fine-tuned by adjusting hyperparameters or
modifying the features. This iterative process aims to improve the model's performance.
8. Deployment:
Once the model achieves satisfactory performance, it can be deployed to make predictions or
automate decision-making in real-world applications.
In summary, machine learning involves the iterative process of training a model on data, evaluating its
performance, and fine-tuning it to make accurate predictions or decisions in real-world scenarios. The
adaptability of machine learning models allows them to improve over time as they encounter new data
and experiences.
Artificial Intelligence (AI) has seen explosive growth in recent years, and the development of
different types of Machine Learning (ML) has been a driving force behind it. The numbers speak
for themselves: According to McKinsey, private equity and venture-capital funding in AI
companies increased nearly fivefold from $16 billion in 2015 to $79 billion in 2022. It’s clear that
businesses are eager to adopt AI/ML and explore its potential. However, with so many different
types of machine learning available, it can be challenging to understand which one is best suited for
a particular application. In this article, let’s take a closer look at the four main types of machine
learning and their respective applications: supervised learning, unsupervised learning, semi-
supervised learning, and reinforcement learning.
3
Supervised learning involves using labeled datasets to train algorithms for accurate
classification or outcome prediction. During training, machines use labeled data to predict
output in the future. The labeled data helps set a strategic path for machines as they map inputs
to the output. Additionally, analysts use test datasets to check the accuracy of the analysis after
training continuously. Various industries such as healthcare, finance, and marketing widely use
supervised learning.
Supervised learning (SL) is a paradigm in machine learning where input objects (for example, a vector of
predictor variables) and a desired output value (also known as human-labeled supervisory signal) train a
model. The training data is processed, building a function that maps new data on expected output values.[1] An
optimal scenario will allow for the algorithm to correctly determine output values for unseen instances. This
requires the learning algorithm to generalize from the training data to unseen situations in a "reasonable" way
(see inductive bias). This statistical quality of an algorithm is measured through the so-called generalization
error.
4
1.3.1 UNSUPERVISED MACHINE LEARNING
Unsupervised machine learning is a category of machine learning where the algorithm is trained on data
without explicit guidance or labeled outputs. In unsupervised learning, the system attempts to identify
patterns, relationships, and structures within the data without predefined categories or target values. The
primary goal is often to explore the inherent structure of the data or to uncover hidden patterns.
Reinforcement Learning
Reinforcement learning is a learning method that interacts with its environment by producing actions and
discovers errors or rewards. Trial and error search and delayed reward are the most relevant characteristics
of reinforcement learning. This method allows machines and software agents to automatically determine
the ideal behavior within a specific context in order to maximize its performance. Simple reward feedback
is required for the agent to learn which action is best.
Semi-Supervised Learning
5
Semi-supervised learning fall somewhere in between supervised and unsupervised learning, since they use
both labeled and unlabeled data for training – typically a small amount of labeled data and a large amount
of unlabeled data. The systems that use this method are able to considerably improve learning accuracy.
Usually, semi-supervised learning is chosen when the acquired labeled data requires skilled and relevant
resources in order to train it / learn from it. Otherwise, acquiring unlabeled data generally doesn’t require
additional resources.
Literature Survey
Theory
A core objective of a learner is to generalize from its experience. The computational analysis of machine
learning algorithms and their performance is a branch of theoretical computer science known as
computational learning theory. Because training sets are finite and the future is uncertain, learning theory
usually does not yield guarantees of the performance of algorithms. Instead, probabilistic bounds on the
performance are quite common. The bias–variance decomposition is one way to quantify generalization
error.
For the best performance in the context of generalization, the complexity of the hypothesis should match
the complexity of the function underlying the data. If the hypothesis is less complex than the function,
then the model has underfit the data. If the complexity of the model is increased in response, then the
training error decreases. But if the hypothesis is too complex, then the model is subject to overfitting and
generalization will be poorer.
In addition to performance bounds, learning theorists study the time complexity and feasibility of learning.
In computational learning theory, a computation is considered feasible if it can be done in polynomial
time. There are two kinds of time complexity results. Positive results show that a certain class of functions
can be learned in polynomial time. Negative results show that certain classes cannot be learned in
polynomial time.
While there has been much progress in machine learning, there are also challenges. For example, the
mainstream machine learning technologies are black-box approaches, making us concerned about their
potential risks. To tackle this challenge, we may want to make machine learning more explainable and
controllable. As another example, the computational complexity of machine learning algorithms is usually
6
very high and we may want to invent lightweight algorithms or implementations. Furthermore, in many
domains such as physics, chemistry, biology, and social sciences, people usually seek elegantly simple
equations (e.g., the Schrödinger equation) to uncover the underlying laws behind various phenomena.
Machine learning takes much more time. You have to gather and prepare data, then train the algorithm.
There are much more uncertainties. That is why, while in traditional website or application development
an experienced team can estimate the time quite precisely, a machine learning project used for example to
provide product recommendations can take much less or much more time than expected. Why? Because
even the best machine learning engineers don’t know how the deep learning networks will behave when
analyzing different sets of data. It also means that the machine learning engineers and data scientists cannot
guarantee that the training process of a model can be replicated.
Future Scope
Future of Machine Learning is as vast as the limits of human mind. We can always keep learning, and
teaching the computers how to learn. And at the same time, wondering how some of the most complex
machine learning algorithms have been running in the back of our own mind so effortlessly all the time.
There is a bright future for machine learning. Companies like Google, Quora, and Facebook hire people
with machine learning. There is intense research in machine learning at the top universities in the world.
The global machine learning as a service market is rising expeditiously mainly due to the Internet
revolution. The process of connecting the world virtually has generated vast amount of data which is
boosting the adoption of machine learning solutions. Considering all these applications and dramatic
improvements that ML has brought us, it doesn't take a genius to realize that in coming future we will
definitely see more advanced applications of ML, applications that will stretch the capabilities of machine
learning to an unimaginable level.
Company Profile
DreamUny Education was created with a mission to create skilled software engineers for our country
and the world. It aims to bridge the gap between the quality of skills demanded by industry and the quality
7
of skills imparted by conventional institutes. With assessments, learning paths and courses authored by
industry experts, DreamUny helps businesses and individuals benchmark expertise across roles, speed up
release cycles and build reliable, secure products.
Objectives
Methodologies
There were several facilitation techniques used by the trainer which included question and answer,
brainstorming, group discussions, case study discussions and practical implementation of some of the
topics by trainees on flip charts and paper sheets. The multitude of training methodologies was utilized in
order to make sure all the participants get the whole concepts and they practice what they learn, because
only listening to the trainers can be forgotten, but what the trainees do by themselves they will never
forget. After the post-tests were administered and the final course evaluation forms were filled in by the
participants, the trainer expressed his closing remarks and reiterated the importance of the training for the
trainees in their daily activities and their readiness for applying the learnt concepts in their assigned tasks.
Certificates of completion were distributed among the participants at the end.
8
CHAPTER 2
TECHNOLOGY IMPLEMENTED
9
including procedural, object-oriented, and functional programming. Python is often described as a
"batteries included" language due to its comprehensive standard library.
Features
• Interpreted
In Python there is no separate compilation and execution steps like C/C++. It directly run the program
from the source code. Internally, Python converts the source code into an intermediate form called
bytecodes which is then translated into native language of specific computer to run it.
• Platform Independent
Python programs can be developed and executed on the multiple operating system platform. Python
can be used on Linux, Windows, Macintosh, Solaris and many more.
• Multi- Paradigm
Python is a multi-paradigm programming language. Object-oriented programming and structured
programming are fully supported, and many of its features support functional programming and
aspectoriented programming .
• Simple
Python is a very simple language. It is a very easy to learn as it is closer to English language. In python
more emphasis is on the solution to the problem rather than the syntax.
o Scikit-learn for handling basic ML algorithms like clustering, linear and logistic regressions,
regression, classification, and others.
o Pandas for high-level data structures and analysis. It allows merging and filtering of data, as well as
gathering it from other external sources like Excel, for instance.
o Keras for deep learning. It allows fast calculations and prototyping, as it uses the GPU in addition to
the CPU of the computer. o TensorFlow for working with deep learning by setting up, training, and
utilizing artificial neural networks with massive datasets.
o Matplotlib for creating 2D plots, histograms, charts, and other forms of visualization.
o NLTK for working with computational linguistics, natural language recognition, and processing.
o Scikit-image for image processing. o PyBrain for neural networks, unsupervised and reinforcement
learning.
o Caffe for deep learning that allows switching between the CPU and the GPU and processing 60+
mln images a day using a single NVIDIA K40 GPU.
3. Flexibility-
11
Python for machine learning is a great choice, as this language is very flexible:
▪ Programmers can combine Python and other languages to reach their goals.
5. Community Support-
It’s always very helpful when there’s strong community support built around the programming
language. Python is an open-source language which means that there’s a bunch of resources open
for programmers starting from beginners and ending with pros. A lot of Python documentation is
available online as well as in Python communities and forums, where programmers and machine
learning developers discuss errors, solve problems, and help each other out. Python programming
language is absolutely free as is the variety of useful libraries and tools.
6. Growing Popularity-
As a result of the advantages discussed above, Python is becoming more and more popular among
data scientists. According to StackOverflow, the popularity of Python is predicted to grow until
2020, at least. This means it’s easier to search for developers and replace team players if required.
Also, the cost of their work maybe not as high as when using a less popular programming language.
Machine Learning algorithms don’t work so well with processing raw data. Before we can feed such
data to an ML algorithm, we must preprocess it. We must apply some transformations on it. With
12
data preprocessing, we convert raw data into a clean data set. To perform data this, there are 7
techniques -
1. Rescaling Data -
For data with attributes of varying scales, we can rescale attributes to possess the same scale. We
rescale attributes into the range 0 to 1 and call it normalization. We use the MinMaxScaler class from
scikitlearn. This gives us values between 0 and 1.
2. Standardizing Data -
With standardizing, we can take attributes with a Gaussian distribution and different means and
standard deviations and transform them into a standard Gaussian distribution with a mean of 0 and a
standard deviation of 1.
3. Normalizing Data -
In this task, we rescale each observation to a length of 1 (a unit norm). For this, we use the Normalizer
class.
4. Binarizing Data -
Using a binary threshold, it is possible to transform our data by marking the values above it 1 and
those equal to or below it, 0. For this purpose, we use the Binarizer class.
5. Mean Removal-
We can remove the mean from each feature to center it on zero.
7. Label Encoding -
Some labels can be words or numbers. Usually, training data is labelled with words to make it readable.
Label encoding converts word labels into numbers to let algorithms work on them.
13
Machine Learning Algorithms
There are many types of Machine Learning Algorithms specific to different use cases. As we work with
datasets, a machine learning algorithm works in two stages. We usually split the data around 20%-80%
between testing and training stages. Under supervised learning, we split a dataset into a training data and
test data in Python ML. Followings are the Algorithms of Python Machine Learning -
1. Linear Regression-
Linear regression is one of the supervised Machine learning algorithms in Python that observes continuous
features and predicts an outcome. Depending on whether it runs on a single variable or on many features,
we can call it simple linear regression or multiple linear regression.
This is one of the most popular Python ML algorithms and often under-appreciated. It assigns optimal
weights to variables to create a line ax+b to predict the output. We often use linear regression to estimate
real values like a number of calls and costs of houses based on continuous variables. The regression line
is the best line that fits Y=a*X+b to denote a relationship between independent and dependent variables.
2. Logistic Regression -
Logistic regression is a supervised classification is unique Machine Learning algorithms in Python that
finds its use in estimating discrete values like 0/1, yes/no, and true/false. This is based on a given set of
independent variables. We use a logistic function to predict the probability of an event and this gives us
14
an output between 0 and 1. Although it says ‘regression’, this is actually a classification algorithm. Logistic
regression fits data into a logit function and is also called logit regression.
3. Decision Tree -
A decision tree falls under supervised Machine Learning Algorithms in Python and comes of use for both
classification and regression- although mostly for classification. This model takes an instance, traverses
the tree, and compares important features with a determined conditional statement. Whether it descends
to the left child branch or the right depends on the result. Usually, more important features are closer to
the root.
Decision Tree, a Machine Learning algorithm in Python can work on both categorical and continuous
dependent variables. Here, we split a population into two or more homogeneous sets. Tree models where
the target variable can take a discrete set of values are called classification trees; in these tree structures,
leaves represent class labels and branches represent conjunctions of features that lead to those class labels.
Decision trees where the target variable can take continuous values (typically real numbers) are called
regression trees.
16
6. kNN Algorithm -
This is a Python Machine Learning algorithm for classification and regression- mostly for classification.
This is a supervised learning algorithm that considers different centroids and uses a usually Euclidean
function to compare distance. Then, it analyzes the results and classifies each point to the group to optimize
it to place with all closest points to it. It classifies new cases using a majority vote of k of its neighbors.
The case it assigns to a class is the one most common among its K nearest neighbors. For this, it uses a
distance function. k-NN is a type of instance-based learning, or lazy learning, where the function is only
approximated locally and all computation is deferred until classification. k-NN is a special case of a
variablebandwidth, kernel density "balloon" estimator with a uniform kernel.
17
7. K-Means Algorithm -
k-Means is an unsupervised algorithm that solves the problem of clustering. It classifies data using a
number of clusters. The data points inside a class are homogeneous and heterogeneous to peer groups. k-
means clustering is a method of vector quantization, originally from signal processing, that is popular for
cluster analysis in data mining. k-means clustering aims to partition n observations into k clusters in which
each observation belongs to the cluster with the nearest mean, serving as a prototype of the cluster. k-
means clustering is rather easy to apply to even large data sets, particularly when using heuristics such as
Lloyd's algorithm. It often is used as a preprocessing step for other algorithms, for example to find a
starting configuration. The problem is computationally difficult (NP-hard). k-means originates from signal
processing, and still finds use in this domain. In cluster analysis, the k-means algorithm can be used to
partition the input data set into k partitions (clusters). k-means clustering has been used as a feature
learning (or dictionary learning) step, in either (semi-)supervised learning or unsupervised learning.
18
8. Random Forest -
A random forest is an ensemble of decision trees. In order to classify every new object based on its
attributes, trees vote for class- each tree provides a classification. The classification with the most votes
wins in the forest. Random forests or random decision forests are an ensemble learning method for
classification, regression and other tasks that operates by constructing a multitude of decision trees at
training time and outputting the class that is the mode of the classes (classification) or mean prediction
(regression) of the individual trees.
19
CHAPTER 3
RESULT DISCUSSION
Result
This training has introduced us to Machine Learning. Now, we know that Machine Learning is a technique
of training machines to perform the activities a human brain can do, albeit bit faster and better than an
average human-being. Today we have seen that the machines can beat human champions in games such
as Chess, Mahjong, which are considered very complex. We have seen that machines can be trained to
perform human activities in several areas and can aid humans in living better lives. Machine learning is
quickly growing field in computer science. It has applications in nearly every other field of study and is
already being implemented commercially because machine learning can solve problems too difficult or
time consuming for humans to solve. To describe machine learning in general terms, a variety models are
used to learn patterns in data and make accurate predictions based on the patterns it observes.
20
Machine Learning can be a Supervised or Unsupervised. If we have a lesser amount of data and clearly
labelled data for training, we opt for Supervised Learning. Unsupervised Learning would generally give
better performance and results for large data sets. If we have a huge data set easily available, we go for
deep learning techniques. We also have learned Reinforcement Learning and Deep Reinforcement
Learning. We now know what Neural Networks are, their applications and limitations. Specifically, we
have developed a thought process for approaching problems that machine learning works so well at
solving. We have learnt how machine learning is different than descriptive statistics.
Finally, when it comes to the development of machine learning models of our own, we looked at the
choices of various development languages, IDEs and Platforms. Next thing that we need to do is start
learning and practicing each machine learning technique. The subject is vast, it means that there is width,
but if we consider the depth, each topic can be learned in a few hours. Each topic is independent of each
other. We need to take into consideration one topic at a time, learn it, practice it and implement the
algorithm/s in it using a language choice of yours. This is the best way to start studying Machine Learning.
Practicing one topic at a time, very soon we can acquire the width that is eventually required of a Machine
Learning expert.
21
CHAPTER 4
PROJECT REPORT
Overview-
A dataset related to adult income is given. This project classifies whether a person will be able to earn
more than 50,000 or not.
Dataset Description-
The US Adult income dataset was extracted by Barry Becker from the 1994 US Census Database. The
data set consists of anonymous information such as occupation, age, native country, race, capital gain,
capital loss, education, work class and more. Each row is labelled as either having a salary greater than
">50K" or "<=50K".
Dataset Source : [Link]
22
Result-
Our project successfully classifies people based on salary with 83.43 % Accuracy
23
CHAPTER 5
Every coin has two faces, each face has its own property and features. It’s time to uncover the faces of ML.
A very powerful tool that holds the potential to revolutionize the way things work.
24
2. No human intervention needed (automation) -
With ML, we don’t need to babysit our project every step of the way. Since it means giving machines the
ability to learn, it lets them make predictions and also improve the algorithms on their own. A common
example of this is anti-virus software. they learn to filter new threats as they are recognized. ML is also
good at recognizing spam.
3. Continuous Improvement -
As ML algorithms gain experience, they keep improving in accuracy and efficiency. This lets them make
better decisions. Say we need to make a weather forecast model. As the amount of data, we have keeps
growing, our algorithms learn to make more accurate predictions faster.
5. Wide Applications -
We could be an e-seller or a healthcare provider and make ML work for us. Where it does apply, it holds
the capability to help deliver a much more personal experience to customers while also targeting the right
customers.
With all those advantages to its powerfulness and popularity, Machine Learning isn’t perfect. The following factors
serve to limit it:
1. Data Acquisition -
Machine Learning requires massive data sets to train on, and these should be inclusive/unbiased, and of
good quality. There can also be times where they must wait for new data to be generated.
4. High error-susceptibility -
Machine Learning is autonomous but highly susceptible to errors. Suppose you train an algorithm with
data sets small enough to not be inclusive. You end up with biased predictions coming from a biased
training set. This leads to irrelevant advertisements being displayed to customers. In the case of ML, such
blunders can set off a chain of errors that can go undetected for long periods of time. And when they do
get noticed, it takes quite some time to recognize the source of the issue, and even longer to correct it.
Social media platforms use machine learning algorithms and approaches to create some attractive and excellent
features. For instance, Facebook notices and records your activities, chats, likes, and comments, and the time you
spend on specific kinds of posts. Machine learning learns from your own experience and makes friends and page
suggestions for your profile.
26
2. Product Recommendations
Product recommendation is one of the most popular and known applications of machine learning. Product
recommendation is one of the stark features of almost every e-commerce website today, which is an advanced
application of machine learning techniques. Using machine learning and AI, websites track your behavior based on
your previous purchases, searching patterns, and cart history, and then make product recommendations.
27
3. Image Recognition
Image recognition, which is an approach for cataloging and detecting a feature or an object in the digital image, is
one of the most significant and notable machine learning and AI techniques. This technique is being adopted for
further analysis, such as pattern recognition, face detection, and face recognition.
28
4. Sentiment Analysis
Sentiment analysis is one of the most necessary applications of machine learning. Sentiment analysis is a real-time
machine learning application that determines the emotion or opinion of the speaker or the writer. For instance, if
someone has written a review or email (or any form of a document), a sentiment analyzer will instantly find out the
actual thought and tone of the text. This sentiment analysis application can be used to analyze a review based
website, decision-making applications, etc.
Organizations are actively implementing machine learning algorithms to determine the level of access employees
would need in various areas, depending on their job profiles. This is one of the coolest applications of machine
learning.
Machine learning algorithms are used to develop behavior models for endangered cetaceans and other marine
species, helping scientists regulate and monitor their populations.
29
7. Regulating Healthcare Efficiency and Medical Services
Significant healthcare sectors are actively looking at using machine learning algorithms to manage better. They
predict the waiting times of patients in the emergency waiting rooms across various departments of hospitals. The
models use vital factors that help define the algorithm, details of staff at various times of day, records of patients,
and complete logs of department chats and the layout of emergency rooms. Machine learning algorithms also come
to play when detecting a disease, therapy planning, and prediction of the disease situation. This is one of the most
necessary machine learning applications.
An algorithm designed to scan a doctor’s free-form e-notes and identify patterns in a patient’s cardiovascular
history is making waves in medicine. Instead of a physician digging through multiple health records to arrive at a
sound diagnosis, redundancy is now reduced with computers making an analysis based on available information.
9. Banking Domain
Banks are now using the latest advanced technology machine learning has to offer to help prevent fraud and protect
accounts from hackers. The algorithms determine what factors to consider to create a filter to keep harm at bay.
Various sites that are unauthentic will be automatically filtered out and restricted from initiating transactions.
One of the most common machine learning applications is language translation. Machine learning plays a
significant role in the translation of one language to another. We are amazed at how websites can translate from one
language to another effortlessly and give contextual meaning as well. The technology behind the translation tool is
called ‘machine translation.’ It has enabled people to interact with others from all around the world; without it, life
would not be as easy as it is now. It has provided confidence to travelers and business associates to safely venture
into foreign lands with the conviction that language will no longer be a barrier.
30