Unit 4 AI LASK
Unit 4 AI LASK
Learning
Learning refers to the process by which machines acquire knowledge or skills through
experience, data, or instruction, enabling them to improve performance on specific tasks.
Forms of Learning
1. Supervised Learning: In supervised learning, the algorithm learns from labeled
data, where each input is associated with a corresponding target output. The
algorithm learns to map inputs to outputs by minimizing the error between its
predictions and the actual labels in the training data.
2. Unsupervised Learning: Unsupervised learning involves learning patterns and
structures from unlabeled data. Algorithms in unsupervised learning aim to identify
hidden patterns or groupings within the data without explicit guidance.
3. Semi-Supervised Learning: This approach combines elements of supervised
and unsupervised learning. It leverages a small amount of labeled data along with
a larger pool of unlabeled data to improve learning accuracy and efficiency.
4. Reinforcement Learning: Reinforcement learning involves training an agent to
interact with an environment in order to achieve a goal. The agent learns through
trial and error, receiving feedback in the form of rewards based on its actions.
Supervised Learning
In supervised learning, the algorithm learns from labeled data, where each input is
associated with a corresponding target output. The algorithm learns to map inputs to
outputs by minimizing the error between its predictions and the actual labels in the
training data.
Machine Learning
Machine learning is a subset of AI that allows a computer automatically to learn patterns
in data without any explicit instructions and make predictions based on that learning.
Decision Tree
A decision tree is a type of supervised learning algorithm that is commonly used in
machine learning to model and predict outcomes based on input data.
It is a tree-like structure where each internal node tests on attribute, each branch
corresponds to attribute value and each leaf node represents the final decision or
prediction.
Decision Tree Terminologies
1. Root Node: The topmost node in a decision tree is called the root node. It
represents the entire dataset and is the starting point for the tree's decision-
making process.
2. Internal Nodes (Decision Nodes): Nodes in the tree whose choices are
determined by the values of particular attributes. There are branches on these
nodes that go to other nodes.
3. Leaf Nodes (Terminal Nodes): The branches’ termini, when choices or forecasts
are decided upon. There are no more branches on leaf nodes.
4. Branches (Edges): Links between nodes that show how decisions are made in
response to particular circumstances.
5. Splitting: The process of dividing a node into two or more sub-nodes based on a
decision criterion.
6. Parent Node: A node that is split into child nodes. The original node from which a
split originates.
7. Child Node: Nodes created as a result of a split from a parent node.
8. Decision Criterion: The rule or condition used to determine how the data should
be split at a decision node.
9. Pruning: The process of removing branches or nodes from a decision tree to
improve its generalisation and prevent overfitting.
Regression and Classification with Linear Models
The Linear Model is one of the most straightforward models in machine learning.linear
models are a class of models that assume a linear relationship between the input
features and the target variable.
Classification
Classification is the process of finding a model or function that helps in separating the
data into multiple categorical classes i.e. discrete values.
In classification, data is categorized under different labels according to some parameters
given in the input and then the labels are predicted for the data.
Classification algorithms are used to predict/Classify the discrete values such as Male or
Female, True or False, Spam or Not Spam, etc.
Types of Classification Algorithms
• Decision Tree
• Random Forest Classifier
• K – Nearest Neighbors
• Support Vector Machine
Regression
Regression is a process of finding the association between dependent and independent
variables. It helps in predicting the continuous variables such as prediction of Market
Trends, prediction of House prices, etc.
Regression are used to predict the continuous values such as price, salary, age, etc.
Types of Regression Algorithms
Linear Regression
Polynomial Regression
Ridge Regression
Lasso Regression
The structures and operations of human neurons serve as the basis for artificial neural
networks. It is also known as neural networks or neural nets.
The input layer of an artificial neural network is the first layer, and it receives input from
external sources and releases it to the hidden layer, which is the second layer.
In the hidden layer, each neuron receives input from the previous layer neurons,
computes the weighted sum, and sends it to the neurons in the next layer.
These connections are weighted means effects of the inputs from the previous layer are
optimized more or less by assigning different-different weights to each input and it is
adjusted during the training process by optimizing these weights for improved model
performance.
Types of Artificial Neural Networks
1. Feedforward Neural Networks (FNNs)
2. Convolutional Neural Networks (CNNs)
3. Recurrent Neural Networks (RNNs)
4. Modular Neural Network
5. Radial basis function Neural Network
Applications of Artificial Neural Networks
1. Social Media
2. Marketing and Sales
3. Healthcare
4. Personal Assistants
Support Vector Machine(SVM)
Visit https://www.geeksforgeeks.org/support-vector-machine-
algorithm/ clearly explained(Till SVM terminology)
Types of SVM:
1.Linear SVM: Linear SVMs use a linear kernel to create a straight-line decision
boundary that separates different classes. ...
2.Nonlinear SVM: Nonlinear SVMs address scenarios where the data cannot be
separated by a straight line in the input feature space.
Advantages of SVM
• Effective in high-dimensional cases.
• Its memory is efficient as it uses a subset of training points in the decision
function called support vectors.
• Different kernel functions can be specified for the decision functions and its
possible to specify custom kernels.