What is Machine Learning?
- Machine learning is a type of artificial intelligence where computers learn from data and improve their performance over time without being explicitly programmed.
- Algorithms detect patterns, make decisions, and predict outcomes based on previous examples.
Supervised Learning
- Supervised learning involves training a model on a labeled dataset, where each input is paired with a corresponding output.
- Types:
- Classification: Predicts discrete categories (e.g., spam or not spam).
- Regression: Predicts continuous values (e.g., house prices).
- Medical Imaging Diagnostics: Supervised learning is used to classify medical images (e.g., X-rays) into diagnostic categories.
- Object detection (e.g. cat or dog in image)
- Sentiment analysis (e.g. positive/negative reviews)
- Predicting student performance
Unsupervised Learning
- Unsupervised learning deals with unlabeled data, aiming to find hidden patterns or structures.
- Types:
- Clustering: Groups similar data points (e.g., customer segmentation).
- Association rule mining (finding item relationships)
- Dimensionality Reduction: Reduces data complexity while preserving important features (e.g., PCA).
Market Basket Analysis: Unsupervised learning algorithms like Apriori identify associations between products in transaction data. (e.g. "People who buy X also buy Y") Customer segmentation Anomaly detection.
Reinforcement Learning
- Reinforcement learning involves an agent learning to make decisions by interacting with an environment to maximize cumulative reward.
- Key Concepts:
- Exploration vs. Exploitation: Balancing trying new actions and using known strategies.
- Policy: A strategy that defines the agent's actions.
- Robotics Navigation: Reinforcement learning enables robots to learn optimal paths by receiving feedback from their actions.
- Game playing (e.g. chess, Go)
- Personalised learning systems
- Financial decision-making
Deep Learning
- Deep learning is a subset of machine learning that uses artificial neural networks with multiple layers to automatically extract and learn hierarchical features from large, complex data sets.
- Architectures:
- Convolutional Neural Networks (CNNs): Ideal for image processing.
- Recurrent Neural Networks (RNNs): Designed for sequential data like text.
- Transformers – modern Natural Language Processing (NLP) and vision models
- Medical Imaging: CNNs are used to detect diseases in X-rays and MRIs.
- Speech and audio recognition
- Natural language processing (e.g. chatbots, translation)
- Educational visual aids and content personalisation
Transfer Learning
- Transfer learning involves reusing a pre-trained model on a new, related task, with the aim to reduce the time and data needed for training a new model.
- How it works:
- Use a pre-trained model (e.g. on a general dataset)
- Fine-tune it on a smaller, specific dataset
- Benefits:
- Reduces training time.
- Improves performance with limited data.
- Natural Language Processing (NLP): Models like BERT are pre-trained on large text corpora and fine-tuned for specific tasks like sentiment analysis.
- Medical imaging (reusing models trained on general images)
- Sentiment analysis (adapting BERT to new text tasks)
- Object detection in specific environments
- Language translation in domain-specific contexts
Real-World Applications of Machine Learning
Market Basket Analysis
- Description: Identifies associations between products in transaction data.
- Algorithm: Apriori (Unsupervised Learning).
Market basket analysis helps retailers design effective cross-selling strategies by understanding which products are frequently purchased together. e.g. Bread and Butter.
Medical Imaging Diagnostics
- Description: Uses deep learning models like CNNs to analyze medical images.
- Learning Paradigms:
- Supervised Learning: Classifies images into diagnostic categories.
- Transfer Learning: Fine-tunes pre-trained models for specific medical tasks.
Transfer learning is crucial in medical imaging due to the scarcity of large, labeled datasets.
Natural Language Processing (NLP)
- Description: Involves processing and understanding human language.
- Techniques:
- Deep Learning: Uses transformers for tasks like translation and sentiment analysis.
- Transfer Learning: Models like BERT are pre-trained on large text datasets and fine-tuned for specific tasks.
Transformers use attention mechanisms to capture complex relationships between words, making them highly effective for NLP tasks.
Object Detection and Classification
- Description: Identifies and classifies objects within images.
- Learning Paradigms:
- Supervised Learning: Trains models on labeled images.
- Deep Learning: Uses CNNs to recognize patterns and features.
- Used in:
- Autonomous vehicles
- Face recognition
- Surveillance and retail
Advanced architectures like YOLO (You Only Look Once) enable real-time object detection by processing images in a single pass.
Robotics Navigation
- Description: Enables robots to navigate and interact with their environment.
- Learning Paradigms:
- Reinforcement Learning: Teaches robots to make decisions through trial and error.
- Supervised Learning: Used for tasks like obstacle recognition.
Reinforcement learning is ideal for robotics because it allows agents to learn from the consequences of their actions in dynamic environments.
Sentiment Analysis
- Description: Analyzes text data to determine sentiment (positive, negative, neutral).
- Learning Paradigms:
- Supervised Learning: Trains models on labeled datasets.
- Deep Learning: Uses LSTMs and transformers to capture contextual nuances.
- Transfer Learning: Adapts pre-trained models to specific domains.
Transfer learning is particularly useful in sentiment analysis, allowing models to be fine-tuned for specific industries or types of text.
Summary
- Supervised Learning: Ideal for tasks with labeled data, such as medical imaging and sentiment analysis.
- Unsupervised Learning: Used for discovering patterns in unlabeled data, like market basket analysis.
- Reinforcement Learning: Suited for decision-making in dynamic environments, such as robotics navigation.
- Deep Learning: Powers complex tasks like image recognition and NLP through neural networks.
- Transfer Learning: Enhances model performance by leveraging pre-trained models for new tasks.
- What is the difference between supervised and unsupervised learning, and give one real-world example of each.
- Why is reinforcement learning well-suited for robotics and game playing?
- How does transfer learning reduce the need for large labelled datasets in tasks like medical imaging or NLP?
- Explain why deep learning models like CNNs are used for object detection and image classification.
- In sentiment analysis, why are deep learning and supervised learning often used together?