1.1 Explain Basic AI Concepts and Terminologies
1. Introduction to Artificial Intelligence (AI)
Definition
Artificial Intelligence (AI) refers to the simulation of human intelligence in machines that are designed to think and act like humans.
These systems can perform tasks that typically require human intelligence, such as understanding natural language, recognizing patterns, solving problems, and making decisions.
Examples of AI Applications:
Application | Description |
---|---|
Personal Assistants | Virtual assistants like Alexa and Siri that help with tasks. |
Fraud Detection | Identifying and preventing fraudulent activities in real-time. |
Medical Imaging | Analyzing medical images (e.g., X-rays) for diagnosis. |
Manufacturing | Quality control and predictive maintenance in factories. |
Customer Support | Automated chatbots and recommendation systems. |
Predictive Analytics | Forecasting trends and demands using historical data. |
Key Concepts
- Machine Learning (ML): A subset of AI that involves algorithms learning from data to make decisions without being explicitly programmed
- Deep Learning: A further subset of ML that uses neural networks with many layers (deep networks) to analyze complex data patterns
- Generative AI: A branch of AI that focuses on creating new content, such as text, images, or code, by learning from existing data, often using models like neural networks
Source: AWS Skillbuilder
2. Machine Learning (ML)
Definition
Machine Learning (ML) is a method of data analysis that automates analytical model building.
It's based on the idea that systems can learn from data, identify patterns, and make decisions with minimal human intervention.
Types of Data
Data Type | Description |
---|---|
Structured Data | Organized in a defined manner (e.g., databases, spreadsheets). |
Semi-Structured Data | Partially organized (e.g., JSON files, XML). |
Unstructured Data | No predefined structure (e.g., emails, social media posts, images). |
Training Process
In ML, the training process involves feeding large amounts of data to an algorithm so that it can learn to make predictions or decisions. This involves:
- Algorithms: The mathematical models that process the data
- Features: The measurable properties or characteristics of the data
- Inference: The process of using the trained model to make predictions on new, unseen data
Machine Learning Styles
ML Style | Description |
---|---|
Supervised Learning | Trains on labeled data (input-output pairs). Example: Image classification. |
Unsupervised Learning | Trains on unlabeled data to find hidden patterns. Example: Clustering analysis. |
Reinforcement Learning | Trains an agent to make decisions through trial and error. Example: AWS DeepRacer. |
2.1. Model Deployment and Inference
Model Artifacts
Once a machine learning model is trained, the output is a set of model artifacts, which include:
- Trained Parameters: The weights and biases learned during training
- Model Definition: A description of the model's architecture and logic
- Inference Code: Software that uses the model artifacts to make predictions
Hosting Options
There are two main ways to deploy and use a machine learning model:
Deployment Type | Description |
---|---|
Real-Time Inference | Deploys the model on a persistent endpoint that can handle immediate requests. Ideal for applications that require low latency and high throughput. |
Batch Inference | Processes data in large batches at scheduled times. Suitable for tasks where immediate results are not needed, and it can be more cost-effective. |
Example Use Cases
- Real-Time Inference: Fraud detection during online transactions
- Batch Inference: Monthly sales forecasts using historical data
2.2. Model Evaluation and Challenges
Overfitting vs. Underfitting
- Overfitting
- Occurs when a model performs exceptionally well on training data but poorly on new data
- It essentially "memorizes" the training data rather than generalizing from it
- Underfitting
- Happens when a model is too simple to capture the underlying trend of the data
- It leads to poor performance on both training and new data
Bias and Fairness
- Bias
- Refers to the tendency of a model to make systematic errors due to imbalanced or biased training data
- For example, if a loan approval model is trained predominantly on data from a certain demographic, it might unfairly reject applications from other groups
- Fairness
- Ensuring that models make equitable decisions across different groups
- This can be achieved by carefully curating training data and continuously monitoring model performance for any signs of bias
Example
— Loan Approval Model: If the training data lacks diversity, the model might incorrectly learn that certain demographic groups are less likely to be approved, leading to biased outcomes.
3. Deep Learning
Definition
Deep Learning is a subset of machine learning that utilizes neural networks with multiple layers (hence "deep").
These networks are inspired by the human brain and are particularly effective at recognizing complex patterns in large datasets.
Source: AWS Skillbuilder
Neural Network Structure
- Input Layer: Receives the initial data
- Hidden Layers: Multiple layers where the data is processed. Each layer extracts features and passes them to the next layer
- Output Layer: Produces the final prediction or classification
Applications
- Image Classification: Identifying objects within images (e.g., identifying fish in photos)
- Natural Language Processing (NLP): Understanding and generating human language (e.g., translating languages or summarizing text)
Deep Learning vs. Traditional ML
Criteria | Traditional ML | Deep Learning |
---|---|---|
Data Type | Structured and labeled data. | Unstructured data like images, text, and audio. |
Feature Extraction | Requires manual feature selection and extraction. | Automatically extracts features from raw data. |
Computation Cost | Generally lower computational cost. | Higher computational cost due to large datasets. |
Use Cases | Predictive analytics, classification, recommendation. | Image recognition, speech recognition, language translation. |
4. Generative AI
Definition
Generative AI refers to models that generate new content based on training data. These models are particularly powerful in tasks like creating text, images, music, and even software code.
Techniques
- Transformers: A type of model architecture that processes sequences of data (e.g., sentences) in parallel, making them efficient for training on large datasets
Applications
- Content Creation: Writing articles, generating images, composing music, etc.
- Language Models: Understanding and generating human language (e.g., chatbots, translation services)
Example
— Generative AI can analyze vast amounts of text data to create a coherent, contextually relevant response to a user's query, making it useful in applications like chatbots and virtual assistants.