2. Name of Institution
Machine Learning
Machine learning is a subset of artificial intelligence (AI) that involves
training algorithms to learn from data and make predictions or decisions
without being explicitly programmed.
Types of Machine Learning
1.Supervised Learning: The algorithm is trained on labeled data to learn the
relationship between input and output variables.
2.Unsupervised Learning: The algorithm is trained on unlabeled data to
discover patterns or relationships.
3.Reinforcement Learning: The algorithm learns through trial and error by
interacting with an environment and receiving feedback.
2
3. Name of Institution
Machine Learning Algorithms
1.Linear Regression: A linear model that predicts a continuous output
variable.
2.Decision Trees: A tree-based model that splits data into subsets based on
features.
3.Random Forest: An ensemble learning method that combines multiple
decision trees.
4. Support Vector Machines (SVMs): A linear or non-linear model that finds
the hyperplane that maximally separates classes.
5. Neural Networks: A complex network of interconnected nodes (neurons)
that learn to represent data.
3
4. Name of Institution
Classification is the process of assigning a label or category to a new
instance based on its characteristics."- Example: spam vs. non-spam emails
Types of Classification
• Binary Classification: two classes (e.g., 0/1, yes/no)
• - Multi-Class Classification: more than two classes (e.g., animal species)
• - Image/Text Classification: classification of images or text documents
4
5. Name of Institution
Classification Techniques
• Decision Trees
• Random Forest
• Support Vector Machines (SVM)
• k-Nearest Neighbors (k-NN)
• Naive Bayes- Neural Networks
5
6. Name of Institution
Decision Tree
A decision tree is a tree-like model that splits data into subsets based on
features. It's a popular supervised learning algorithm used for classification
and regression tasks.
6
7. Name of Institution
How does a Decision Tree work?
1. Root Node: The decision tree starts with a root node, which represents
the entire dataset.
2. 2. Splitting: The algorithm splits the data into subsets based on the best
feature to split on. This is typically done using a greedy approach, where
the algorithm chooses the feature that results in the purest subsets.
3. 3. Child Nodes: The subsets of data are represented by child nodes,
which are created by splitting the data.
4. 4. Recursion: The algorithm recursively splits the data into subsets until
a stopping criterion is met, such as when all instances in a node belong
to the same class.
5. 5. Leaf Nodes: The final nodes in the tree are called leaf nodes, which
represent the predicted class labels.
7
8. Name of Institution
Advantages of Decision Trees
• 1. Easy to Interpret: Decision trees are easy to understand and interpret,
making them a popular choice for many applications.
• 2. Handle Missing Values: Decision trees can handle missing values by
treating them as a separate category.
• 3. Non-Parametric: Decision trees are non-parametric, meaning they
don't require any assumptions about the distribution of the data.
8
9. Name of Institution
Disadvantages of Decision Trees
• 1. Overfitting: Decision trees can suffer from overfitting, especially when
the trees are deep.
• 2. Not Robust to Noise: Decision trees can be sensitive to noise in the
data.
• 3. Not Suitable for Complex Relationships: Decision trees are not
suitable for modeling complex relationships between features.
9
10. Name of Institution
Support Vector Machine (SVM)
• A Support Vector Machine (SVM) is a supervised learning algorithm
used for classification and regression tasks. It's a powerful and versatile
algorithm that can handle high-dimensional data and non-linear
relationships.
10
11. Name of Institution
How does an SVM work?
• 1. Linear Separability: SVMs work by finding a hyperplane that separates
the data into different classes. In the case of linearly separable data, the
hyperplane is a line that maximally separates the classes.
• 2. Maximizing the Margin: The goal of the SVM is to maximize the
margin between the hyperplane and the nearest data points (called
support vectors). This is done by minimizing the norm of the weight
vector.
• 3. Soft Margin: In cases where the data is not linearly separable, SVMs
use a soft margin approach, which allows for some misclassifications.
• 4. Kernel Trick: SVMs can also handle non-linear relationships by using
the kernel trick, which maps the data into a higher-dimensional space
where it becomes linearly separable.
11
12. Name of Institution
Types of SVMs
1. Linear SVM: Used for linearly separable data.
2. 2. Non-Linear SVM: Used for non-linearly separable data, using the
kernel trick.
3. 3. Support Vector Regression (SVR): Used for regression tasks.
12
13. Name of Institution
Advantages of SVMs
• 1. High Accuracy: SVMs can achieve high accuracy, especially in cases
where the data is non-linearly separable.
• 2. Robustness to Noise: SVMs are robust to noise and outliers in the
data.
• 3. Flexibility: SVMs can handle high-dimensional data and non-linear
relationships.
13
14. Name of Institution
Disadvantages of SVMs
• 1. Computational Complexity: SVMs can be computationally expensive,
especially for large datasets.
• 2. Overfitting: SVMs can suffer from overfitting, especially when the
number of features is large.
• 3. Difficult to Interpret: SVMs can be difficult to interpret, especially when
using the kernel trick.
14
15. Name of Institution
References
Burkov, Andriy (2019): The hundred-page machine learning book, Vol. 1.
Quebec City, QC, Canada: Andriy Burkov.
Robert, Christian (2020): Machine learning, a probabilistic perspective, 62-63.
Burkov, Andriy (2020): Machine learning engineering, Vol. 1. Montreal, QC,
Canada: True Positive Incorporated.
Harrington, Peter (2012): Machine learning in action, Simon and Schuster.
15