Machine Learning Notes
Machine Learning Notes
10. (a) Explain the three techniques under supervised feature selection
Supervised feature selection aims to identify the most relevant features for a given
machine learning task, using the available labels. Common techniques include:
• Filter methods: These methods evaluate features based on their individual scores,
independent of the chosen learning algorithm. Examples include:
o Correlation-based methods: Measure the correlation between features and the
target variable.
o Information gain: Measures the reduction in entropy (uncertainty) when a
feature is used to make a decision.
• Wrapper methods: These methods evaluate feature subsets based on their
performance with a specific learning algorithm. This involves training and evaluating
the model multiple times with different feature combinations. Examples include:
o Recursive feature elimination (RFE): Iteratively removes features with the least
importance according to the model.
o Forward selection: Starts with an empty set of features and adds features one
by one based on their contribution to the model's performance.
• Embedded methods: These methods perform feature selection as part of the model
training process. Examples include:
o L1 regularization (Lasso): Adds a penalty term to the model's objective
function, which encourages the model to use fewer features.
o Decision tree-based methods: Feature importance can be estimated based on
how often a feature is used to make decisions in a decision tree.
10. (b) Explain the benefits of using feature selection in machine learning
• Improved model performance: Removing irrelevant or redundant features can lead
to better generalization and reduced overfitting.
• Reduced training time and computational cost: Fewer features mean faster training
and lower memory usage.
• Increased model interpretability: By selecting a smaller subset of features, it
becomes easier to understand which features are most important for the model's
predictions.
• Reduced dimensionality: Feature selection can be used to reduce the
dimensionality of the data, which can be beneficial for visualization and other
downstream tasks.
10. (c) Explain the curse of dimensionality
The curse of dimensionality refers to the challenges that arise when dealing with high-
dimensional data. As the number of features increases:
1 2
• Data sparsity: Data points become increasingly sparse in the feature space, making
it difficult to find meaningful patterns and relationships.
• Overfitting: Models with many features are more likely to overfit the training data,
leading to poor generalization performance.
• Computational complexity: Many machine learning algorithms have computational
complexity that increases exponentially with the number of features.
11. (a) What is Artificial Intelligence and why do we need it?
Artificial intelligence (AI) is the field of computer science that aims to create intelligent
agents, which are systems that can reason, learn, and act autonomously. We need AI to
3
solve complex problems that are beyond the capabilities of humans, such as:
• Automating tasks: AI can automate repetitive and mundane tasks, freeing up human
time and resources.
• Making better decisions: AI can analyze large amounts of data and make more
informed decisions than humans.
• Developing new technologies: AI is driving innovation in areas such as robotics,
medicine, and transportation.
11. (b) What is Deep Learning, and give some of its examples that are used in real-
world?
Deep learning is a subfield of machine learning that uses artificial neural networks with
multiple layers (deep neural networks) to learn complex patterns and representations
4
• Image recognition: Used in self-driving cars, facial recognition systems, and medical
image analysis.
• Natural language processing: Used in chatbots, machine translation, and sentiment
analysis.
• Speech recognition: Used in voice assistants like Siri and Alexa.
11. (c) Differentiate between Artificial Intelligence, Machine Learning, and Deep
Learning
• Artificial intelligence (AI): The broad field of creating intelligent agents.
• Machine learning (ML): A subset of AI that focuses on enabling computers to learn
from data without being explicitly programmed.
• Deep learning (DL): A subset of ML that uses deep neural networks to learn
complex representations from data.