Week-2 ML and CC
Week-2 ML and CC
• Machine Learning is a field of study that gives computers the ability to learn without being
explicitly programmed.
• Machine Learning is the use and development of computer systems that can learn and adapt
without following explicit instructions, by using algorithms and statistical models to analyse and
draw inferences from patterns in data.
Definitions of Machine Learning
▶ Machine learning (ML) is a type of artificial intelligence (AI) that allows software
applications to become more accurate at predicting outcomes without being explicitly
programmed to do so. Machine learning algorithms use historical data as input to predict new
output values.
▶ Machine Learning is a branch of Artificial Intelligence that allows machines to learn and
improve from experience automatically. It is defined as the field of study that gives
computers the capability to learn without being explicitly programmed. It is quite different
than traditional programming.
Supervised Learning:
1. Supervised Learning is a type of machine learning algorithms which learns from the labelled
dataset. This machine learning method that needs supervision similar to the student-teacher
relationship.
2. In supervised learning, the training data you feed to the algorithm includes the desired solutions,
called labels.
3. In supervised Learning, a machine is trained with well-labeled data, which means some data is
From the above figure we can notice that machine is trained with well labelled dataset. Which
includes the features o the apple. hence when an apple is given as an input the model is able to
predict it as an apple.
Unsupervised Learning:
1. Unlike supervised learning, unsupervised Learning does not require classified or well-labeled
data to train a machine.
2. It aims to make groups of unsorted information based on some patterns and differences even
without any labelled training data. In unsupervised Learning, no supervision is provided, so no
sample data is given to the machines.
3. Hence, machines are restricted to finding hidden structures in unlabeled data by their own.
Reinforcement Learning
1. Reinforcement Learning is a very different type of learning. The learning system, is called an
agent in this context, can observe the environment, select, and perform actions, and get
rewards in return (or penalties in the form of negative rewards).
2. It must then learn by itself what is the best strategy, called a policy, to get the most reward
over time. A policy defines what action the agent should choose when it is in a given
situation.
3.
Supervised learning algorithms are trained in Unsupervised learning algorithms are trained
labelled data. using unlabeled data.
Supervised learning model takes direct Unsupervised learning model does not take
feedback to check if it is predicting correct any feedback.
output or not.
Supervised learning model predicts the output. Unsupervised learning model finds the hidden
patterns in data.
In supervised learning, input data is provided Unsupervised learning does not need any
to the model along with the output supervision to train the model.
The goal of supervised learning is to train the The goal of unsupervised learning is to find
model so that it can predict the output when it the hidden patterns and useful insights from
is given new data. the unknown dataset.
Supervised learning needs supervision to train Unsupervised learning does not need any
model. supervision to train the model.
Supervised learning can be used for those Unsupervised learning can be used for those
cases where we know the input as well as cases where we have only input data and no
corresponding outputs. corresponding output data.
It includes various algorithms such as Linear It includes various algorithms such as
Regression, Logistic Regression, Support Clustering, KNN, and Apriori algorithm.
Vector Machine, Multi-class Classification,
Decision tree, etc.
Supervised learning model produces an Unsupervised learning model may give less
accurate result. accurate result as compared to supervised
learning.
It is used to identify objects, persons, places, digital images, etc. The popular use case of image
recognition and face detection is, Automatic friend tagging
2. Speech Recognition
Speech recognition is a process of converting voice instructions into text, and it is also known as
"Speech to text", or "Computer speech recognition." At present, machine learning algorithms are
widely used by various applications of speech recognition. Google assistant, Siri, Cortana,
and Alexa are using speech recognition technology to follow the voice instructions.
3. Traffic prediction:
If we want to visit a new place, we take help of Google Maps, which shows us the correct path with
the shortest route and predicts the traffic conditions. It predicts the traffic conditions such as
whether traffic is cleared, slow-moving, or heavily congested with the help of two ways:
o Real Time location of the vehicle form Google Map app and sensors
o Average time has taken on past days at the same time.
4. Product recommendations:
Machine learning is widely used by various e-commerce and entertainment companies such
as Amazon, Netflix, etc., for product recommendation to the user. Whenever we search for some
product on Amazon, then we started getting an advertisement for the same product while internet
surfing on the same browser and this is because of machine learning.
5. Self-driving cars:
One of the most exciting applications of machine learning is self-driving cars. Machine learning
plays a significant role in self-driving cars. Tesla, the most popular car manufacturing company is
working on self-driving car. It is using unsupervised learning method to train the car models to
detect people and objects while driving.
Whenever we receive a new email, it is filtered automatically as important, normal, and spam. We
always receive an important mail in our inbox with the important symbol and spam emails in our
spam box, and the technology behind this is Machine learning. Below are some spam filters used by
Gmail:
o Content Filter
o Header filter
o General blacklists filter
o Rules-based filters
o Permission filters
Machine learning is making our online transaction safe and secure by detecting fraud transaction.
Whenever we perform some online transaction, there may be various ways that a fraudulent
transaction can take place such as fake accounts, fake ids, and steal money in the middle of a
transaction. So, to detect this, Feed Forward Neural network helps us by checking whether it is a
For each genuine transaction, the output is converted into some hash va
In medical science, machine learning is used for diseases diagnoses. With this, medical technology
is growing very fast and able to build 3D models that can predict the exact position of lesions in the
brain. It helps in finding brain tumours and other brain-related diseases easily.
Challenges in ML
1. Inadequate Training Data
The major issue that comes while using machine learning algorithms is the lack of quality as well
as quantity of data. Once the data is collected it has to be validated if data is sufficient for the use
cases
3. Non-representative Training Data : The training data should be representative of the new
cases to generalize well i.e., the data we use for training should cover all the cases that occurred
and that is going to occur. By using a non-representative training set, the trained model is not likely
to make accurate predictions.
4. Irrelevant/Unwanted Features If the training data contains a large number of irrelevant features
and enough relevant features, the machine learning system will not give the results as expected.
5. Overfitting the Training Data Whenever a machine learning model is trained with a huge amount
of data, it starts capturing noise and inaccurate data into the training data set. It negatively affects
the performance of the model.
6. Underfitting the Training data Underfitting is just the opposite of overfitting. Whenever a
machine learning model is trained with fewer amounts of data, and as a result, it provides
incomplete and inaccurate data and destroys the accuracy of the machine learning model.
7. Model Selection:
There are many different ML algorithms to choose from, and selecting the right one for a particular
problem is challenging.
8. Feature Engineering: Extracting useful features from raw data is a critical step in ML, but it can
be difficult to identify the most relevant features.
11. Deployment:
Deploying ML models in production environments can be difficult, as it requires expertise in both
ML and software engineering.
Building a model
1. Collecting Data: machines initially learn from the data. The quality and quantity of data that
will directly determine how good the predictive model can be.
2. Preparing the Data: Data preparation, where we load our data into a suitable place and
prepare it for use in our machine learning training.
3. Choosing a Model. There are many models that researchers and data scientists have created
over the years. Choosing right model is important.
4. Training the Model. The model is trained using the dataset and finding features and patterns.
5. Evaluating the Model. Evaluation allows us to test our model against data that has never been
used for training.
6. Parameter Tuning. it is possible further improve training model in any way. We can do this
by tuning our parameters.
7. Making Predictions. Prediction, or inference, is the step where we get to answer some
questions. This is the point of all this work, where the value of machine learning is realized.
• Data science is an interdisciplinary field that uses scientific methods, processes, algorithms, and
systems to extract knowledge and insights from noisy, structured, and unstructured data, and
apply knowledge from data across a broad range of application domains
1. Capital Expenditure
In traditional data center, applications are hosted on on-premise data center. Huge capital
investment is required to build the data center. Funds used by a company to acquire, upgrade
and maintain physical assets such as property, plants, buildings, technology or equipment is
high.
3. Maintenance overhead
The enterprise needs to maintain the infrastructure to provide high performance to the clients
which consumes much cost.
5. Reduced ROI
Maintenance overhead, Resource over/under utilization reduces Return on investment.
6. Security Risks
On-prem servers are physical assets, and face the same dangers the rest of the building
might beexposed to, including fires, floods, or break-ins.
2. Ubiquitous access
Cloud resources can be accessed by anywhere anytime.
The customer generally has no control or information over the location of the provided resources
but is able to specify location at a higher level of abstraction
4. Elasticity
Elasticity is the automated ability of a cloud to transparently scale IT resources, as required in
responseto runtime conditions or as pre-determined by the cloud consumer or cloud provider
5. Measured usage
The measured usage characteristic represents the ability of a cloud platform to keep track of the
usage of its IT resources, primarily by cloud consumers. Based on what is measured, the cloud
provider can charge a cloud consumer only for the IT resources actually used.
6. Resiliency
Resiliency can refer to redundant IT resources within the same cloud (but in different physical
locations) or across multiple clouds.
• Public cloud
• Community cloud
• Private cloud
• Hybrid cloud
1. Public cloud
• Public cloud makes it possible for anybody to access systems and services . The public
may be secure as it is open to everyone.
• The public cloud is one in which cloud infrastructure services are provided over the
internet to the general people or major industry groups.
• The infrastructure in this cloud model owned by the entity that delivers the cloud
services, not by the consumer.
• It is a type of cloud boosting that allows customers and users to easily access systems and
services.
• This form of cloud computing is an excellent example of cloud hosting, in which service
providers supply services to a variety of customers.
• In this arrangement, storage backup and retrieval services are given for free, as a
subscription, or on a per-user basis. Example: Google App Engine etc.
2.Private Cloud:
• The private cloud deployment model is the exact opposite of the public cloud deployment
model. t's one-on-one environment for a single user (customer). There is no need to share your
hardware with anyone else.
• The distinction between private and public clouds is in how you handle all of the hardware, It is
also called the "internal cloud" & it is refer to the ability to access systems and services with in
a given border or organization.
• The cloud platform it is implemented in a cloud-based secure environment that is protected by
powerful firewalls and under the supervision of an organization's IT department. The private
cloud gives greater flexibility of control over cloud resources.
•
Dept. of CSE | SPT 14
WEEK-2 MACHINE LEARNING & CLOUD COMPUTING
Hybrid Cloud
By bridging the public and private worlds with a layer of proprietary software, hybrid cloud
computing gives the best of both worlds. With a hybrid solution, you may host the app in a
safe environment while taking advantage of the public cloud’s cost savings. Organizations
can move data and applications between different clouds using a combination of two or more
cloud deployment methods, depending on their needs.
Software as a Service(SaaS)
1. The SaaS delivery model is typically used to make a reusable cloud service widely available (often
commercially) to a range of cloud consumers.
2. Software as a Service is a way of delivering services and applications over the Internet. Instead of
installing and maintaining software, we simply access it via the Internet, freeing ourselves from the
complex software and hardware management. It removes the need to install and run applications on
our own computers or in the data centers eliminating the expenses of hardware as well as software
maintenance.
3. Readily available software applications.
4. Accessed through web browser.
5. No visibility over backend.
6. Billed based on subscription.Example of
Software as a service:
1. Microsoft Office 365
2. Google Apps
3. Microsoft Teams
Serverless services
1. It is more suitable for handling asynchronous events.
2. Serverless services will be in active till user invokes it.
3. It allows you to focus on productive business requirements rather than IT infrastructure setup and
management.
4. Capacity provisioning and scalability is managed by cloud service provider. Hence it reduces Total
Cost of Owner.
5. It allows high availability and fault tolerant to the architecture. It is also known as function as a
service.
Virtualization
1. Virtualization is the process of converting a physical IT resource into a virtual IT resource.
2. The first step in creating a new virtual server through virtualization software is the allocation
of physical IT resources, followed by the installation of an operating system.
3. Virtual servers use their own guest operating systems, which are independent of the operating
systemin which they were created.
4. Both the guest operating system and the application software running on the virtual server are
unaware of the virtualization process, meaning these virtualized IT resources are installed
andexecuted as if they were running on a separate physical server.
5. Hypervisor manages resources for Virtual Machines.
Fig 2: Virtualization
Types of Virtualizations
Storage: - Amazon Simple Storage Service (S3) provides scalable data storage with backup and
replication. Compute: - Amazon Elastic Compute Cloud (EC2) provides virtual servers or instances
for computing. It isauto-scalable as per the requirement.
Database: - Amazon Relational Database Service provides a fully managed database service that
includes Oracle, SQL, MySQL, etc
Developer Tool: - AWS CodeCommit provides fully managed private GIT repositories to store code
and manage versions. Apart from these services, AWS provides AWS CodePipeline, AWS
CodeBuild, AWS CodeDeploy, AWS CLoud9 to support development and deployment.
Machine Learning: - Amazon SageMaker provides services to quickly build, train and deploy
models at a big scale. AWS offers ML service for speech recognition, language translation,
chatbots, and many other scenarios, with high speed and scalability.
2. Azure
Some of the popular services of Azure cloud provider are:
Azure Active Directory: - Azure Active Directory (AD) is one of the most popular cloud computing
services from Microsoft Azure. Belonging to the Identity section, it is a universal identity platform
to ensure the management and security of identities.
Azure CDN: - Its server is designed in a way that it can integrate a lot of storage space, web apps,
and Azure cloud services. This is why Azure CDN is used to deliver content securely all across the
world.
Azure Data Factory: - Azure Data Factory ingests data from several sources to automate data
transmission and movement. Azure Data Factory creates and monitors workflows.
Azure SQL: - Azure SQL database adds a readily available data storage facility with enhanced
performance for enterprises.
Azure Backup: - Azure Backup allows simple data protection tools from the Azure Web app
services, tokeep your data protected from ransomware or loss of any kind.
Containers
1. Containers provide light weight runtime environment for app deployment.
2. It bundles its applications with all the required dependencies, along with its configuration in
a singleimage.
3. It uses components of host kernel from the host operating system in order to provide
deploymentenvironment to deploy applications.
Benefits of Containers
1. Rapid Scalability: As containers boot up time is about fraction of seconds; they
provide rapidscalability.
2. Uses less resources: Each container does not have a guest operating system. As a result, it
consumes very less resources like storage and memory.
3. Greater efficiency: Greater efficiency is achieved as the container requires less resources to
spin up.
4. Increased portability: Containers are highly portable and can run on any infrastructure.
Container Orchestration
Container orchestration is a process for managing the deployment, integration, scaling, and lifecycles of
containerized software and applications in complex, dynamic environments.
• Automates the container management.
• Integrates well with CI/CD workflows
• Manages the container availability
• Manages Load balancing and routing
• Enables secure interaction among containers
• Examples: Docker Swarm, Kubernetes, Apache Mesos, Amazon EKS, GKE
Cloud native is the software approach of building, deploying, and managing modern applications in cloud
computing environments.
Cloud-native applications are software programs that consist of multiple small, interdependent services
called microservices.
By using the cloud-native approach, software developers break the functionalities into smaller
microservices. This makes cloud-native applications more agile as these microservices work independently
and take minimal computing resources to run.
Cloud-native application development describes how and where developers build and deploy cloud-native
applications.
Developers adopt specific software practices to decrease the software delivery timeline and deliver accurate
features that meet changing user expectations.
Continuous integration
Continuous integration (CI) is a software practice in which developers integrate changes into a shared code
base frequently and without errors. Small, frequent changes make development more efficient because you
can identify and troubleshoot issues faster.
Continuous delivery
Continuous delivery (CD) is a software practice that supports cloud-native development. With CD,
development teams ensure that the microservices are always ready to be deployed to the cloud.
DevOps
DevOps is a software culture that improves the collaboration of development and operations teams. DevOps
practices allow organizations to speed up the software development lifecycle. Developers and operation
engineers use DevOps tools to automate cloud-native development.
Serverless
Serverless computing is a cloud-native model where the cloud provider fully manages the underlying server
infrastructure. Developers use serverless computing because the cloud infrastructure automatically scales
and configures to meet application requirements. Developers only pay for the resources the application uses.
The serverless architecture automatically removes compute resources when the app stops running.
Microservices
Microservices are small, independent software components that collectively perform as complete cloud-
native software. Each microservice focuses on a small, specific problem. Microservices are loosely coupled,
which means that they are independent software components that communicate with each other. Developers
make changes to the application by working on individual microservices. That way, the application
continues to function even if one microservice fails.
Containers
Containers are the smallest compute unit in a cloud-native application. They are software components that
pack the microservice code and other required files in cloud-native systems. By containerizing the
microservices, cloud-native applications run independently of the underlying operating system and
hardware. This means that software developers can deploy cloud-native applications on premises, on cloud
infrastructure, or on hybrid clouds.
Super Admin
Super Admins have unrestricted privileges in the Cloud Administration Console, including the ability to add
or edit other administrators. Super Admins are responsible for setting up SecurID for the first time, then
maintaining, updating, and troubleshooting the deployment as necessary.
Help Desk Admins assist users who authenticate with the Cloud Authentication Service.
Cloud SDK provides language-specific Cloud Client Libraries supporting each language’s natural
conventions and styles. This makes it easier for you to interact with Google Cloud APIs in your language
of choice.
Google Cloud SDK is a set of tools which are used to manage applications and resources that are hosted on a
Google Cloud Platform.
Cloud Billing
A Cloud Billing account defines who pays for a given set of Google Cloud resources. To use
Google Cloud services, you must have a valid Cloud Billing account, and must link it to your
Google Cloud projects. Your project's Google Cloud usage is charged to the linked Cloud Billing
account.
You must have a valid Cloud Billing account even if you are in your free trial period or if you only
use Google Cloud resources that are covered by the Google Cloud Free Tier.
SLA
A Service Level Agreement (SLA) is the bond for performance negotiated between the cloud
services provider and the client. Earlier, in cloud computing all Service Level Agreements were
negotiated between a client and the service consumer. Nowadays, with the initiation of large utility-
like cloud computing providers, most Service Level Agreements are standardized until a client
becomes a large consumer of cloud services. Service level agreements are also defined at different
levels which are mentioned below:
• Customer-based SLA
• Service-based SLA
• Multilevel SLA
Some service level agreements are enforceable as contracts, but most are agreements or contracts
that are more in line with an operating level agreement (OLA) and may not be constrained by law. It
is okay to have a lawyer review documents before making any major settlement with a cloud service
provider. Service level agreements usually specify certain parameters, which are mentioned below:
If a cloud service provider fails to meet the specified targets of the minimum, the provider will have
to pay a penalty to the cloud service consumer as per the agreement. So, service level agreements are
like insurance policies in which the corporation has to pay as per the agreement if an accident
occurs.
BIG DATA
What is Big Data
Big data is a collection of data [both structured and unstructured] that is huge in volume, yet growing
exponentially with time.
Examples:-
1. The statistic shows that 500+terabytes of new data get ingested into the databases of social media
site Facebook, every day. This data is mainly generated in terms of photo and video uploads,
message exchanges, putting comments etc.
2. A single Jet engine can generate 10+terabytes of data in 30 minutes of flight time. With many
thousand flights per day, generation of data reaches up to many Petabytes.
• Volume
• Variety
• Velocity
• Variability
(i) Volume – The name Big Data itself is related to a size which is enormous. Size of data plays a very
crucial role in determining value out of data.
(ii) Variety – Variety refers to heterogeneous sources and the nature of data, both structured and
unstructured.
(iii) Velocity – The term ‘velocity’ refers to the speed of generation of data. How fast the data is generated
and processed to meet the demands, determines real potential in the data.
(iv) Variability – This refers to the inconsistency which can be shown by the data at times, thus hampering
the process of being able to handle and manage the data effectively.
Sources of Data
• Data collected from social Media sites like Facebook , WhatsApp , Twitter , YouTube ,
Instagram , etc.
• Sensor placed in various places of the city that gathers data on temperature, humidity, etc. A
camera placed in sensitive areas like airports, railway stations, and shopping malls create a lot
of data.
• IOT Appliance: Electronic devices that are connected to the internet create data for their smart
functionality, examples are a smart TV, smart washing machine, smart coffee machine, smart
AC, etc. It is machine-generated data that are created by sensors kept in various devices.
• Customer feedback on the product or service of the various company on their website creates
data. For Example, retail commercial sites like Amazon, Walmart, Flipkart, and Myntra gather
customers feedback on the quality of their product and delivery time.
• E-commerce: In e-commerce transactions, business transactions, banking, and the stock market,
lots of records stored are considered one of the sources of big data. Payments through credit
card, debit cards, or other electronic ways, all are kept recorded as data.
• debit cards, or other electronic ways, all are kept recorded as data.
• Global Positioning System (GPS): GPS in the vehicle helps in monitoring the movement of the
vehicle to shorten the path to a destination to cut fuel, and time consumption. This system
creates huge data on vehicle position and movement.
• Transactional Data: Transactional data, as the name implies, is information obtained through
online and offline transactions at various points of sale. The data contains important information
about transactions, such as the date and time of the transaction, the location where it took place
etc.
1. Big Data helps machine learning by providing a variety of data so machines can learn
more or multiple samples or training data.
2. In such ways, businesses can accomplish their dreams and get the benefit of big data
using MLalgorithms.
3. The larger the amount of data that Artificial Intelligence systems can access, the more
machines canlearn and therefore more accurate and efficient their results will be.
4. As AI becomes smarter, less human intervention is required when it comes to process
control and machine monitoring.
Important questions: