Machine Learning in Unit-1
Machine Learning in Unit-1
Machine Learning (ML) is a type of artificial intelligence (AI) where computers learn from
data to make decisions or predictions. Instead of being told exactly what to do, the computer
finds patterns and makes decisions based on those patterns. It improves over time as it processes
more data.
1. Spam Detection:
○ Email services (like Gmail) use ML to identify and block spam emails. It learns
which emails are unwanted based on past examples and user actions.
2. Recommendation Systems:
○ Platforms like Netflix or YouTube or Amazon use ML to suggest movies,
products, or shows based on your viewing or shopping history. It learns your
preferences over time and improves its recommendations.
3. Self-driving Cars:
○ ML helps cars recognize objects (like other cars, pedestrians, or traffic signs) and
make decisions (like stopping or turning) while driving, improving safety.
4. Medical Diagnosis:
○ In healthcare, ML is used to analyze medical images (like X-rays or MRIs) and
help doctors detect diseases, such as cancer or heart conditions, faster and more
accurately.
These applications show how machine learning helps automate and improve tasks by learning
from data.
OR
1. Automation of Tasks:
○ ML aims to automate complex tasks without human intervention, like email
sorting, driving cars, or diagnosing diseases.
2. Making Predictions:
○ ML is used to predict future events based on past data, like predicting stock
prices, weather forecasts, or sales trends.
3. Improving Accuracy:
○ Over time, ML models aim to get more accurate by learning from new data. This
helps in better decision-making and error reduction.
4. Pattern Recognition:
○ ML's goal is to find hidden patterns in data that humans may not easily detect,
such as customer behavior trends or medical symptoms.
5. Real-Time Decision Making:
○ In fields like self-driving cars or financial markets, ML systems make quick
decisions in real-time by processing large amounts of data instantly.
6. Learning from Experience:
○ ML models continuously improve by learning from their mistakes and past
experiences, becoming smarter and more efficient.
7. Cost and Time Reduction:
○ By automating tasks, ML helps businesses save time and money. For example,
ML-based customer support systems can handle queries without the need for
human workers.
8. Customization and Personalization:
○ ML helps in creating personalized experiences, like recommending products or
content based on a user's behavior, making interactions more relevant and
efficient.
9. Handling Large Data:
○ ML models can handle massive datasets, making sense of big data in areas like
healthcare, social media, and finance, where traditional methods would struggle.
10. Adapting to Changes:
○ ML systems aim to adapt to new conditions. For example, spam filters learn and
adapt to new types of spam emails, improving over time.
These objectives help create smarter systems that learn from data, improve on their own, and
make better decisions for various applications.
3.What are the basic design issues and approaches to machine learning?
The basic design issues and approaches in Machine Learning (ML) revolve around how to
create efficient models. Here are the key issues and approaches:
Understanding these issues and approaches helps in designing better ML systems that are
efficient and effective.
OR
Basic Design Issues in Machine Learning:
1. Choosing the Model: Pick the right algorithm for the problem (e.g., decision tree, neural
network).
2. Data Quality: Ensure clean, relevant, and enough data.
3. Overfitting/Underfitting:
○ Overfitting: Model is too complex, learns noise.
○ Underfitting: Model is too simple, misses important patterns.
4. Feature Selection: Choose the most important input variables.
5. Model Evaluation: Use proper metrics like accuracy, precision, etc.
6. Efficiency: Make the model fast and use fewer resources.
7. Bias-Variance Tradeoff: Balance between model complexity and performance.
8. Data Privacy: Handle data ethically and follow regulations.
Requires external
Supervision No supervision No supervision
supervision
K-means clustering,
Linear Regression,
Hierarchical clustering, Q-learning, SARSA, Deep
Algorithms Logistic Regression,
DBSCAN, Principal Q-Network
SVM, KNN
Component Analysis
Maps labeled inputs to Finds patterns and trends in Trial and error method with
Learning Process
known outputs data rewards and penalties
8.What is the difference between Find - S and candidate elimination algorithm?
Purpose Finds the most specific hypothesis Finds the complete version space
that fits all positive examples. (all consistent hypotheses).
Type of Only considers positive examples. Considers both positive and negative
Learning examples.
Initial Starts with the most specific Starts with the most general and
Hypothesis hypothesis (empty or null hypothesis). most specific hypothesis.
Hypothesis Moves toward general hypothesis. Shrinks the version space by ruling
Space out inconsistent hypotheses.
Efficiency Simple and fast, but may miss some More complex and slower but gives
general hypotheses. a complete solution.
Handling Poor at handling noise in the data. Handles noise better by maintaining
Noise multiple hypotheses.
Summary:
● Find-S is simpler and faster but only finds the most specific hypothesis.
● Candidate Elimination is more thorough, finding all hypotheses that are consistent with
the data.
i) Supervised Learning
● Definition: A type of machine learning where the model is trained using labeled data,
meaning each training example has an input-output pair.
● Example: A spam detection system that learns from emails labeled as "spam" or "not
spam." The model is trained on this labeled data to classify new emails.
● Definition: A type of machine learning where the model is trained on unlabeled data. The
goal is to find patterns or groupings in the data without predefined labels.
● Example: A customer segmentation system that analyzes purchasing behavior to group
customers into different clusters based on their buying habits without prior labels.
● Definition: A type of machine learning where an agent learns to make decisions by taking
actions in an environment and receiving feedback in the form of rewards or penalties.
● Example: A self-driving car that learns to navigate by receiving positive rewards for safe
driving and negative penalties for accidents or traffic violations.
v) Specific Hypothesis
● Definition: The set of all hypotheses that are consistent with the training examples. It
represents the possible solutions the learning algorithm is considering.
● Example: If you are trying to classify animals as either "cats" or "dogs" based on their
features (like size and color), the version space includes all the possible rules that can
correctly classify the animals based on the training data.
Summary Table
Term Definition Example
Supervised Model learns from labeled data Spam detection using labeled
Learning (input-output pairs). emails (spam or not).
General A broad assumption covering many "All animals with fur are
Hypothesis instances. mammals."
Version Space The set of all hypotheses consistent All possible rules to classify
with training examples. animals as cats or dogs based on
their features.
10. Discuss Induction Bias in Decision Tree Learning. Differentiate between two types of
Bias. Why prefer short Hypothesis?
Induction Bias refers to the preferences or assumptions made by an algorithm when learning
from data. In decision tree learning, it helps the algorithm choose among different possible trees
based on certain criteria.
1. Statistical Bias:
○ Definition: This is the bias introduced by relying on a limited set of training data.
○ Effect: It can lead to incorrect conclusions because the model may not represent
the entire dataset well.
○ Example: If a decision tree is trained on data that mostly has one type of
outcome, it may misclassify other outcomes.
2. Preference Bias:
○ Definition: This is the bias toward simpler or more general hypotheses when
building the decision tree.
○ Effect: It helps avoid overfitting by preferring simpler models over complex ones.
○ Example: A decision tree might stop splitting when it reaches a certain depth to
keep the model simple.
Summary