AI Lecture 02
AI Lecture 02
First things first, where are we headed? Clearly define the problem you want to solve and the
goals you aim to achieve. Are you predicting customer churn, diagnosing diseases, or generating
creative content?
2. Data Collection
Gather relevant data from various sources, ensuring it is clean, relevant, and
sufficient for the task.
3. Data Preprocessing
Data preprocessing is like cleaning, sorting, and preparing those ingredients. Address missing
4. Feature Engineering
Select, extract, or create meaningful features from the data to improve model
performance.
5. Model Selection
Evaluate the trained model's performance using appropriate metrics and validate it
on separate test data to assess generalization
8. Model Tuning
The algorithm learns to map inputs to outputs based on the provided examples.
Labeled data is made up of input-output pairs, where the algorithm accepts data as input
Imagine you are trying to estimate the price of a car based on its mileage.
Linear regression can help you model this relationship by fitting a straight
line to the data, where each point represents a car's mileage and price
HOW LINEAR REGRESSION WORKS
1.Data Points: It analyzes data points, each with an independent
variable (like size) and a dependent variable (like price).
2.Finding the Line: It draws a straight line that best fits the data
points, minimizing the overall error between the line's predictions and
the actual values.
It models the probability that a given input belongs to a particular class using the
logistic function (sigmoid function).
They divide the dataset repeatedly into subsets based on feature values, resulting in a tree-like
structure with each node representing a feature and each branch representing a choice based on that
feature.
The operation continues until the data is properly partitioned or a halting requirement is fulfilled.
Decision trees are interpretable and adaptable, able to handle both numerical and categorical
information.
They improve comprehension of decision-making processes and can deal with nonlinear
relationships.
They
20XX may, however, experience overfitting if notPitch
cleaned
deck title or regularized adequately. 30
20XX Pitch deck title 31
20XX Pitch deck title 32
RANDOM FOREST
Random forests are ensemble learning methods that combine
multiple decision trees to improve predictive accuracy and reduce
overfitting.
During prediction, the ensemble of trees aggregates their outputs, yielding robust
and reliable results.
Random Forest is well-known for its simplicity, scalability, and capacity to handle
high-dimensional data, making it a popular choice for machine learning
applications.
20XX Pitch deck title 34
20XX Pitch deck title 35
SUPPORT VECTOR MACHINES (SVM)
Support Vector Machines (SVMs) are a distinct breed of supervised learning algorithms,
They work by creating a clear dividing line, called a hyperplane, between different groups of
data points. But unlike other algorithms, SVMs don't just draw any line – they strive for the
Think of it like separating two groups of friends at a party. You wouldn't just draw a random line
down the middle, would you? You'd try to find the widest possible gap, ensuring the two groups
36
are as distinct as possible. That's the essence of SVMs.
NEURAL NETWORKS
Neural networks are a class of machine learning models inspired by the structure and function of the human brain. They consist
of interconnected layers of neurons (nodes) that process and transform input data to produce output predictions. Neural
networks can learn complex patterns and relationships in data through a process called training, where the model adjusts its
parameters to minimize the difference between predicted and actual outputs.
•Input Layer: Receives input data and passes it to the next layer.
•Hidden Layers: Intermediate layers between the input and output layers. Each neuron in a hidden layer performs a
computation based on the inputs it receives and passes the result to the next layer.
•Weights and Biases: Parameters of the model that are learned during training to adjust the strength of connections between
neurons and the neuron's activation threshold, respectively.
•Activation Functions: Non-linear functions applied to the output of neurons to introduce non-linearity into the model,
20XX Pitch deck title 37
enabling it to learn complex relationships.
Types of Neural Networks
Convolutional Neural Networks (CNN): Designed for processing grid-like data, such
as images, by using convolutional layers to detect spatial patterns.
Recurrent Neural Networks (RNN): Designed for sequential data, such as time series
or natural language, by introducing connections between neurons to capture temporal
dependencies.
Long Short-Term Memory Networks (LSTM): A type of RNN that can learn long-
term dependencies by maintaining a memory state over time.
20XX Pitch deck title 38
EXAMPLE
Consider an image classification task where we want to classify images of
handwritten digits (0-9) using a neural network.
The CNN will learn to detect features like edges and shapes in the input images
through convolutional layers and make predictions about the digit present in the
image through its output layer