Artificial Intelligence Fundamentals
Explore how artificial intelligence systems learn from data, recognize patterns, make predictions, generate content, and support decision-making.
1. What Is Artificial Intelligence?
Artificial intelligence (AI) is a field of computer science concerned with creating systems that perform tasks commonly associated with abilities such as perception, language processing, reasoning, planning, and decision-making.
Examples of AI
- Speech recognition and voice assistants.
- Image recognition and object detection.
- Recommendations for music, videos, and products.
- Navigation and route prediction.
- Language translation and conversational systems.
- Scientific data analysis and forecasting.
2. AI, Machine Learning, and Deep Learning
These terms are related, but they do not mean exactly the same thing.
Artificial Intelligence
|
└── Machine Learning
|
└── Deep Learning
This diagram shows a common conceptual relationship. AI also includes approaches that do not rely on machine learning, such as rule-based reasoning and some search and planning methods.
3. How Does Machine Learning Work?
Machine learning uses data and an algorithm to build a model that can perform a task, such as classifying an image or estimating a value.
Collect data
|
v
Prepare and inspect data
|
v
Choose a model and learning method
|
v
Train the model
|
v
Evaluate on separate data
|
v
Deploy, monitor, and improve
Important terms
- Dataset: A collection of examples used for analysis or learning.
- Feature: An input property used by a model.
- Label: The target answer provided for a training example in supervised learning.
- Model: A learned or constructed representation used to produce outputs.
- Training: The process of adjusting model parameters or structure according to a learning method.
- Inference: Using a trained model to produce a prediction or output.
4. Main Types of Machine Learning
Supervised learning
The model learns from examples containing inputs and known target answers.
Unsupervised learning
The model looks for structure or patterns in data without relying on labelled target answers for every example.
Reinforcement learning
An agent learns to choose actions by interacting with an environment and receiving rewards or penalties according to a defined objective.
| Type | Learning signal | Example task |
|---|---|---|
| Supervised | Known target answers | Classifying emails as spam or not spam |
| Unsupervised | Patterns in data | Grouping similar documents |
| Reinforcement | Rewards from actions | Learning a game-playing strategy |
5. Neural Networks
An artificial neural network is a machine-learning model built from connected computational units commonly called neurons. These units combine inputs using adjustable parameters and activation functions.
Input layer
|
v
Hidden layer(s)
|
v
Output layer
Layers in a simple network
- Input layer: Receives the model's input features.
- Hidden layers: Transform information using learned parameters and activation functions.
- Output layer: Produces the final prediction or other result.
Training a neural network
During training, the network's predictions are compared with a training objective. An optimization method adjusts its parameters to reduce the chosen loss function.
A common training method for neural networks uses backpropagation to calculate gradients and an optimizer to update parameters.
6. Generative AI
Generative AI refers to AI systems that produce new content, such as text, images, audio, video, or computer code.
Examples of generated content
Large language models
A large language model (LLM) is trained on large amounts of text and other suitable data to model patterns in language. Many LLMs generate text by predicting likely next tokens based on the context and their learned parameters.
A token may represent a word, part of a word, punctuation, or another unit of text. Tokens are not always the same as words.
7. Algorithms Used in AI
Different problems require different algorithms. No single method is best for every AI task.
- Linear regression: Estimates numerical values using a linear relationship between inputs and output.
- Decision trees: Make predictions through a sequence of feature-based decisions.
- K-means clustering: Groups data into a chosen number of clusters according to distance-based criteria.
- Nearest neighbours: Predicts or classifies using similar examples in a dataset.
- Search algorithms: Explore possible states or paths to find a solution.
- Neural networks: Learn complex patterns through layers of parameterized computations.
8. Data Quality and Model Evaluation
The quality of data strongly influences what a model learns. Missing values, incorrect labels, unbalanced examples, and unrepresentative samples can lead to poor results.
Training, validation, and test data
- Training set: Used to fit the model.
- Validation set: Helps select models or tune settings.
- Test set: Used for a final evaluation on data kept separate from training and model selection.
Overfitting and underfitting
Common evaluation measures
- Accuracy: The proportion of predictions that are correct.
- Precision: Among predicted positive cases, the proportion that are actually positive.
- Recall: Among actual positive cases, the proportion correctly identified.
- Mean squared error: The average of squared differences between predicted and actual numerical values.
9. AI Applications
AI is most useful when its performance is appropriate for the task and its limitations are understood by the people using it.
10. Limitations and Responsible AI
AI systems can be powerful, but they also have limitations. Responsible development includes evaluating their effects on people and society.
Important challenges
- Bias: Data or design choices can produce systematically unfair results.
- Privacy: Personal data may be collected, inferred, or exposed inappropriately.
- Reliability: A system can make errors, including confident-looking errors.
- Explainability: It may be difficult to understand why a complex model produced a particular output.
- Security: Systems may be manipulated or exposed to malicious inputs.
- Resource use: Training and operating some models can require substantial computing power and energy.
- Human oversight: High-impact decisions may require meaningful human review and accountability.
Good practices when using AI
- Verify important claims using reliable sources.
- Avoid entering confidential or sensitive information into services unless their data practices permit it.
- Consider who could be unfairly affected by a model's errors.
- Follow relevant rules for privacy, copyright, and academic integrity.
- Use qualified human judgment for important medical, legal, financial, or safety decisions.
11. Knowledge Check
Try answering each question before revealing the answer.
1. What is the relationship between AI, machine learning, and deep learning?
2. What is the difference between supervised and unsupervised learning?
3. What does a model learn during training?
4. What is generative AI?
5. What is overfitting?
6. Why should training and test data be kept separate?
7. Why should AI-generated information be verified?
Key Takeaways
- AI is a broad field focused on systems that perform tasks associated with intelligent behaviour.
- Machine learning uses data to learn patterns; deep learning uses multilayer neural networks.
- Supervised, unsupervised, and reinforcement learning use different learning approaches.
- Generative AI can create text, images, audio, video, and code.
- Data quality and careful evaluation affect model reliability.
- Bias, privacy, security, and resource use are important AI challenges.
- AI should be used thoughtfully, with verification and appropriate human oversight.