DA-chap2
DA-chap2
Supervised learning algorithms are trained on the labeled dataset. They learn to map input features to targets based
on labeled training data. There are two main types of supervised learning:
● Regression: Regression algorithm learns to predict continuous values based on input features.
● Classification: Classification algorithm learns to assign input data to a specific category or class based on
input features. The output labels in classification are discrete values.
Example: Predicting house prices based on features like the number of rooms, location, etc. The training
dataset would have both the input features (e.g., size, location) and the known house prices (output), and the
model learns this relationship.
2. Unsupervised Machine Learning
Unsupervised learning algorithm learns to recognize patterns in data without being explicitly trained using labeled examples.
The goal is to discover the underlying structure or distribution in the data.
There are two main types of unsupervised learning:
● Clustering: Clustering algorithms group similar data points together based on their characteristics. The goal is to
identify groups, or clusters, of data points that are similar to each other, while being distinct from other groups.
● Dimensionality reduction: Dimensionality reduction algorithms reduce the number of input variables in a dataset
while preserving as much of the original information as possible. This is useful for reducing the complexity of a
dataset and making it easier to visualize and analyze.
Example: Market basket analysis, where a retailer can discover associations between products that customers often
purchase together (e.g., customers who buy bread may also buy butter).
3. Reinforcement Machine Learning
In Reinforcement Learning, an agent learns to interact with an environment by performing actions and receiving rewards or
penalties based on its actions. The goal of reinforcement learning is to learn a policy, which is a mapping from states to actions,
that maximizes the expected cumulative reward over time.
There are two main types of reinforcement learning:
● Model-based reinforcement learning: The agent learns a model of the environment, including the transition
probabilities between states and the rewards associated with each state-action pair. The agent then uses this model
to plan its actions in order to maximize its expected reward.
● Model-free reinforcement learning: The agent learns a policy directly from experience without explicitly building a
model of the environment. The agent interacts with the environment and updates its policy based on the rewards it
receives.
Example: In video games, a model learns to play the game by receiving feedback (points or penalties) for actions (like
jumping or moving) it takes at each step.
Introduction to Machine learning, Deep learning and
Artificial Intelligence
Artificial Intelligence Machine Learning Deep Learning
Example: A robot vacuum cleaner that Example: Email spam filters are an Example: Facial recognition systems,
can autonomously navigate through a example of ML. Over time, the filter like those used in security systems or
room, avoid obstacles, and clean learns to classify incoming emails as social media platforms to tag photos,
efficiently is an example of AI. It uses spam or not spam based on patterns are powered by Deep Learning. These
sensors and programming to mimic from previous emails marked by the systems can analyze pixel patterns in
human intelligence in navigating its user. It improves as more data images to recognize faces by learning
environment. (emails) are processed. from large datasets of images.
Definition and Model of Machine Learning
Machine Learning (ML) is a subset of Artificial Intelligence (AI) that focuses on
developing algorithms that allow computers to learn from and make predictions or
decisions based on data, without explicit programming. In simpler terms, instead
of being told exactly what to do, machines use patterns and past experiences
(data) to improve their performance over time.
Need for Machine Learning
● Handling Big Data: We now have huge amounts of data. ML helps make sense of it
all quickly and efficiently.
● Automation: ML can automate repetitive tasks, saving time and reducing errors (like
chatbots answering customer questions).
● Better Decisions: ML helps make better, data-driven decisions by finding patterns and
trends in data (like predicting stock prices).
● Personalization: It helps customize services to individual preferences (like Netflix
recommending shows based on what you’ve watched).
● Prediction: ML can predict future trends (like weather forecasts or predicting product
demand).
● Adaptation: It can keep improving over time as it learns from new data (like
self-driving cars getting better with experience).
●
Advantages of Disadvantages of machine learning
Advantages of Machine Learning
1. Automation: It automates tasks, saving time.
2. Accuracy: Makes predictions and decisions more accurately.
3. Handles Big Data: Can work with huge amounts of data quickly.
4. Improves Over Time: Learns and gets better as it gets more data.
5. Personalization: Tailors recommendations to individuals (like Netflix suggestions).
2. Fraud Detection
● Example: Banks and financial institutions use ML to detect fraudulent activities in real-time, like unusual credit card
transactions.
4. Healthcare Diagnostics
● Example: ML helps doctors diagnose diseases from medical images, predict patient outcomes, and recommend
treatments (e.g., detecting cancer from X-rays).
5. Self-Driving Cars
● Example: Autonomous vehicles use ML to recognize road signs, pedestrians, and other vehicles to navigate safely.
6. Natural Language Processing (NLP)
● Example: ML powers language translation tools (like Google Translate) and chatbots that
understand and respond to customer inquiries.
7. Predictive Analytics
● Example: In business, ML is used to predict future trends, like sales forecasts or customer
behavior.
8. Spam Filtering
● Example: Email services use ML to detect and filter out spam messages from your inbox.
● Example: Video games use ML to create intelligent non-playable characters (NPCs) that adapt to player
behavior.
● Example: ML helps companies predict demand, optimize inventory, and improve delivery schedules.
● Example: ML is used to target the right ads to the right people based on their browsing habits and
demographics.
● Example: Platforms like Facebook and Instagram use ML to analyze user interactions and provide
personalized content.