0% found this document useful (0 votes)
4 views3 pages

Lecture18 Introduction To Machine Learning

This lecture introduces Machine Learning (ML), explaining its significance in data science and differentiating between Supervised and Unsupervised Learning. It covers the concepts of training and testing sets, the importance of data splitting, and provides real-world applications for both types of learning. Key takeaways emphasize the need for models to generalize well to new data and the structure of supervised and unsupervised learning tasks.
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
4 views3 pages

Lecture18 Introduction To Machine Learning

This lecture introduces Machine Learning (ML), explaining its significance in data science and differentiating between Supervised and Unsupervised Learning. It covers the concepts of training and testing sets, the importance of data splitting, and provides real-world applications for both types of learning. Key takeaways emphasize the need for models to generalize well to new data and the structure of supervised and unsupervised learning tasks.
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd

Lecture 18: Introduction to Machine

Learning
Week 4: Data Visualization & Statistics

Learning Objectives
By the end of this lecture, students will be able to:
1. Understand what Machine Learning is and its importance in data science
2. Differentiate between Supervised and Unsupervised Learning
3. Explain the concept of Training and Testing sets
4. Recognize real-world applications of ML algorithms

1. What is Machine Learning?


Machine Learning (ML) is a subset of Artificial Intelligence (AI) that enables computers
to learn from data and improve their performance without being explicitly programmed.
Key Definition: "A computer program is said to learn from experience E with respect to
some task T and some performance measure P, if its performance on T, as measured
by P, improves with experience E." — Tom Mitchell
Why Machine Learning?
• Automates decision-making processes
• Discovers hidden patterns in large datasets
• Makes predictions based on historical data
• Continuously improves with more data

2. Supervised Learning
In Supervised Learning, the algorithm learns from labeled data — data that includes
both input features and the correct output (target/label).
How It Works
5. Provide the model with input-output pairs (training data)
6. The model learns the relationship between inputs and outputs
7. Model predicts outputs for new, unseen inputs

Types of Supervised Learning


Type Description Examples
Classification Predicts discrete Email spam detection,
categories/labels Disease diagnosis, Image
classification
Regression Predicts continuous House price prediction, Stock
numerical values prices, Temperature
forecasting

3. Unsupervised Learning
In Unsupervised Learning, the algorithm works with unlabeled data — data without
predefined categories or correct answers. The model discovers hidden patterns on its
own.
Types of Unsupervised Learning
Type Description Examples
Clustering Groups similar data points Customer segmentation,
together Document grouping, Image
compression
Dimensionality Reduces number of features PCA, Feature extraction,
Reduction while preserving information Data visualization
Association Finds relationships between Market basket analysis,
variables Recommendation systems

4. Training and Testing Sets


One of the most fundamental concepts in ML is splitting your data into separate sets for
training and evaluation.
Why Split the Data?
• Prevent Overfitting: Model should generalize to new data, not memorize
training data
• Honest Evaluation: Testing on unseen data gives realistic performance metrics
• Model Selection: Compare different algorithms fairly

Common Split Ratios


Split Training Set Test Set
Standard 80% 20%
Alternative 70% 30%
Note: For more advanced scenarios, a validation set (typically 10-20%) is used for
hyperparameter tuning.

5. Real-World Applications
Supervised Learning Examples
• Email Spam Filter: Classifies emails as spam or not spam based on labeled
training data
• House Price Prediction: Predicts prices based on features like location, size,
bedrooms
• Medical Diagnosis: Classifies diseases based on patient symptoms and test
results

Unsupervised Learning Examples


• Customer Segmentation: Groups customers by purchasing behavior for
targeted marketing
• Anomaly Detection: Identifies unusual patterns in network traffic or transactions
• Recommendation Systems: Discovers patterns in user behavior to suggest
products

Key Takeaways
8. Machine Learning enables computers to learn patterns from data
9. Supervised Learning uses labeled data (Classification & Regression)
10. Unsupervised Learning discovers patterns in unlabeled data (Clustering)
11. Always split data into Training (80%) and Testing (20%) sets
12. The goal is to build models that generalize well to new, unseen data

Demo: What We'll Cover


In the accompanying code demonstration, we will:
13. Load and explore a sample dataset
14. Split data into training and testing sets using Scikit-learn
15. Train a simple classification model
16. Evaluate model performance on test data
17. Visualize the results

You might also like