Unit I1
Unit I1
2. Defining AI Techniques
AI techniques are methods that machines use to emulate human-like
intelligence. These techniques can be categorized based on their function or
approach:
Key AI Techniques:
1. Search Algorithms:
o Example: Depth-First Search (DFS), Breadth-First Search (BFS), A*.
o Usage: Pathfinding in robotics or games.
2. Knowledge Representation:
o Structures used to store knowledge for reasoning:
Semantic networks.
Frames.
Logical expressions (propositional or predicate logic).
o Example: Representing relationships like "John is a brother of
Mary."
3. Learning Methods:
o Supervised Learning: Learning from labeled data (e.g., spam email
detection).
o Unsupervised Learning: Identifying patterns in unlabeled data
(e.g., clustering).
o Reinforcement Learning: Learning by trial and error to maximize
rewards (e.g., game-playing AI).
8. Logic Programming
Logic programming uses logic as the primary framework for computation.
Prolog is a widely used language for logic programming.
Example in Prolog:
prolog
Copy code
parent(X, Y) :- father(X, Y).
parent(X, Y) :- mother(X, Y).
UNIT II: Preparing a Model
Machine Learning (ML) models require a structured process that includes data
understanding, preparation, and transformation. Each step is critical to
ensuring the model performs accurately and efficiently. Below is a detailed
explanation of the subtopics in this chapter:
5. Data Preprocessing
a. Dimensionality Reduction:
Reduces the number of features while retaining significant information.
Techniques:
o Principal Component Analysis (PCA).
o Singular Value Decomposition (SVD).
b. Feature Subset Selection:
Identifies the most relevant features.
Methods:
o Filter Methods: Based on statistical measures like correlation.
o Wrapper Methods: Evaluate subsets by training a model.
o Embedded Methods: Feature selection integrated within
algorithms (e.g., decision trees).
1. Selecting a Model
a. Predictive Models:
Used for regression or classification tasks.
Examples:
o Regression: Predicting house prices.
o Classification: Determining if an email is spam or not.
b. Descriptive Models:
Discover hidden patterns in data.
Examples:
o Clustering customers into segments.
o Association rules to find product purchase patterns (e.g., market
basket analysis).
2. Training a Model
a. Holdout Method:
Split data into:
o Training Set: For learning (e.g., 80%).
o Testing Set: For evaluation (e.g., 20%).
b. K-Fold Cross Validation:
Split data into kkk subsets (folds).
Train on k−1k-1k−1 folds and test on the remaining fold.
Repeat kkk times to get the average performance.