0% found this document useful (0 votes)
18 views8 pages

Ai Notes

Uploaded by

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

Ai Notes

Uploaded by

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

FORM OF MACHINE LEARNING:-

What is Machine Learning?


Definition: Machine learning (ML) is a branch of artificial intelligence that allows
computers to learn from data and improve their performance over time
without being explicitly programmed.
1. Supervised Learning
Definition: In supervised learning, algorithms are trained on labelled datasets,
meaning the input data is paired with the correct output.
Types of Problems-
Supervised learning can be categorized into two main types:
a) Classification: Used when the output variable is categorical (e.g., spam vs.
not spam). The model predicts which category an input belongs to. Example:
Identifying whether an email is spam based on features like sender and subject
line.
b) Regression: Used when the output variable is continuous (e.g., predicting
prices). The model predicts a numerical value based on input variables.
Example: Predicting a person's salary based on years of experience and
education level.
Applications
• Healthcare: Diagnosing diseases from medical images by training on
labeled datasets of images and their diagnoses.
• Marketing: Customer segmentation and targeting through predictive
analytics based on past purchasing behavior.
• Image Recognition: Classifying images into categories such as identifying
objects or faces in photos.
• Email Spam Detection: Models are trained on emails labeled as "spam" or
"not spam" to classify new emails.
• Fraud Detection - Supervised Learning classification algorithms are used
for identifying fraud transactions, fraud customers, etc. It is done by using
historic data to identify the patterns that can lead to possible fraud.

2. Unsupervised Learning
Definition: This form involves training algorithms on unlabeled data, allowing
them to identify patterns or groupings without prior knowledge of the
outcomes.
Types- a)Clustering
Description: Groups similar data points together based on their features.
How It Works: Imagine sorting a box of mixed candies into different jars based
on color or type.
Common Algorithms:
K-Means Clustering: Partitions data into K distinct clusters based on feature
similarity.
Hierarchical Clustering: Builds a tree of clusters by either merging or splitting
existing clusters.
b)Association Rule Learning:
Definition: It identifies patterns in data, showing how items are associated with
each other. For example, it can reveal that customers who buy bread often also
buy butter.
Applications:
• Customer Segmentation: Groups customers based on buying behavior for
targeted marketing.
• Anomaly Detection: Identifies unusual patterns that may indicate fraud or
defects
• Market Basket Analysis:Description: Identifies items that are frequently
purchased together.
• Recommendation Systems: Analyzes user behavior to recommend
products or content.
• Gene Expression Analysis: Simplifies genomic data to identify significant
genes related to diseases.

3)Reinforcement Learning
Definition: It identifies patterns in data, showing how items are associated with
each other. For example, it can reveal that customers who buy bread often also
buy butter.
Types:
a. Model-Based Reinforcement Learning
Purpose: Builds a model of the environment to simulate outcomes and optimize
actions.
Applications:
Robotic Planning: Robots learn to navigate complex environments by simulating
potential actions and outcomes.
b. Model-Free Reinforcement Learning
Purpose: Learns directly from the environment without an internal model.
Applications:
Game Playing: Uses algorithms like Q-learning or Deep Q-Networks to learn
optimal strategies in games such as chess or Go.
Applications of Reinforcement Learning
• Gaming: RL is used to create AI that can play and master complex games
• Robotics: RL helps robots learn how to perform tasks and adapt to new
situations.
• Autonomous Vehicles: RL enables self-driving cars to learn from their
surroundings and make safe driving decisions.
• Finance: Used for optimizing trading strategies and managing investment
portfolios.

Q(imp)What do you understand by Bayesian network explain with example?


Ans:- A Bayesian Network is a graphical model that represents a set of
variables and their conditional dependencies using a Directed Acyclic Graph
(DAG). Each node in the graph represents a variable, while the edges (arrows)
indicate the relationships between these variables.
Key Components
• Nodes: Represent random variables.

• Edges: Indicate dependencies; if there’s an edge from node A to node B, A


influences B.
• Conditional Probability Tables (CPTs): For each node, these tables specify
the probability of the node given its parent nodes.
Probabilities:
• Each node has a probability table that defines the likelihood of different
outcomes based on its parent nodes.
• These probabilities are often based on data or expert knowledge.

Reasoning: BBNs allow for two types of reasoning:


• Predictive: Reasoning from causes to effects
• Diagnostic: Reasoning from effects to causes

Advantages of Bayesian Belief Networks (BBNs)


1. Handles Uncertainty:
• BBNs are great at dealing with uncertainty. They help you make
decisions even when you don’t have all the information.
2. Shows Cause and Effect:
• They clearly show how different things are connected. For example,
if there’s a burglary, it can cause the alarm to go off. This helps you
understand what influences what.
3. Easy to Update:
• If you want to add new information or variables, it’s simple to do so
without starting over. You can easily adjust the network as new data
comes in..
4. Predicts Outcomes:
• BBNs can predict what might happen based on the information you
have. For example, if the alarm rings, they can help you figure out
how likely it is that a burglary occurred.
5. Saves Memory:
• When dealing with many variables, BBNs can be more efficient in
using memory compared to other methods, making them quicker
and easier to work with.
6. Learns Over Time:
• BBNs can improve their predictions as more data becomes
available. They learn from new information, which helps them
become more accurate.

What is Inductive Learning?


1. Definition: Inductive learning is a method where an AI system learns
patterns and rules from specific instances or examples to make
predictions about new, unseen data.
2. Process:
• Data Collection: Gather specific examples with known outcomes.
• Pattern Recognition: Identify common features and relationships in
the data.
• Model Creation: Develop a model that can predict outcomes for
new examples based on the learned patterns.
Example: Classifying Fruits

Scenario: An AI system is designed to classify fruits based on their


features. We will teach the AI to recognize apples and oranges.
Step-by-Step Process

1. Data Collection:
- Gather a set of labelled examples of fruits. For instance, collect images
of apples and oranges along with their characteristics:
- Apples: Red or green, round shape, smooth skin.
- Oranges: Orange color, round shape, bumpy skin.
2. Hypothesis Space:
- Define the possible rules or patterns the AI can learn from the data.
For example:
- Rule 1: If the fruit is red or green and has smooth skin, it is likely an
apple.
- Rule 2: If the fruit is orange and has bumpy skin, it is likely an orange.

3. Hypothesis Generation:
- The AI examines the features of the collected data and generates
hypotheses based on observed patterns. It might create rules like:
- "Fruits that are round and smooth-skinned are apples."
- "Fruits that are orange and bumpy-skinned are oranges."

4. Hypothesis Evaluation:
- Test these hypotheses on new examples (fruits not in the training set)
to see how accurately they classify them. For instance, if a new fruit
image appears:
- **New Fruit**: A round, smooth-skinned fruit that is red.
- The AI applies its rules and predicts it is an apple.

5. Hypothesis Refinement:
- If the AI makes incorrect predictions (e.g., classifying a fruit
incorrectly), it refines its hypotheses based on feedback. For example, if it
misclassifies a fruit due to varying shades of color or texture, it adjusts its
rules to account for these variations.

6. Generalization:
- After refining its rules based on testing and feedback, the AI can now
classify new, unseen fruits accurately based on the learned patterns. For
example:
- A new fruit that is round, orange, and bumpy will be classified as an
orange.
example of statistical learning using **k-means clustering**.
Example: Customer Segmentation

Scenario: Imagine you run a small coffee shop and want to segment your
customers based on their spending habits.

Data: You collect data on two features: the average amount they spend per visit
and the number of visits per month.

Steps:
1. Choose the number of clusters (k):
You decide to segment your customers into 2 groups (k = 2).

2. Run k-means clustering:


The algorithm randomly assigns customers to 2 clusters and then iteratively
updates the assignments based on the mean of each cluster until it stabilizes.

3. Results:
After processing, you might find:
- Cluster 1: Customers A, C, and D (low spend, high visits)
- Cluster 2: Customers B and E (high spend, low visits)

Interpretation:
- Cluster 1: These are frequent visitors who spend less. You might consider
offering them loyalty rewards.
- Cluster 2: These customers spend more but visit less often. You could target
them with promotions to increase their visit frequency.

What is Wumpus world problem explain with example?


The Wumpus World is a classic problem that illustrates various concepts such
as knowledge representation, reasoning, and decision-making
Environment:
o A 4x4 grid of rooms.
o The agent initially in room square [1, 1]

o an agent navigates to find gold while avoiding dangers like a monster


called the Wumpus and bottomless pits.
Actions: The agent can perform actions such as moving forward, turning,
grabbing gold, and shooting an arrow at the Wumpus.
Goal: The agent's goal is to locate the gold and exit the cave without being
killed by the Wumpus or falling into a pit.

Sensors:
• Stench: Indicates the presence of the Wumpus in an adjacent room.
• Breeze: Indicates a pit in an adjacent room.
• Glitter: Indicates that gold is present in the current room.

PEAS Description
Performance Measures:
• +1000 points for retrieving gold and exiting safely.
• -1000 points for being eaten by the Wumpus or falling into a pit.
• Each move costs -1 point; using an arrow costs -10 points
• The game ends if either agent dies or came out of the cave.

You might also like