Artificial Intelligence & Machine Learning (Leaving Cert Computer Science): Revision Notes
Artificial Intelligence & Machine Learning
Artificial Intelligence
Artificial intelligence is the field of computer science focused on creating systems capable of performing tasks that typically require human intelligence such as learning, reasoning, problem-solving etc.
Types of Artificial Intelligence
Narrow (Weak) A.I
- Also known as weak A.I, These are systems designed and trained for a specific task. They perform their designated function well but cannot operate beyond their predefined task.
- Virtual assistants such as Siri or Amazon Alexa are examples of weak A.I as they are designed to perform specific tasks such as setting reminders or playing music.
General A.I
- Also known as strong A.I, these are systems with general intelligence, meaning they are capable of learning and applying their knowledge across a wide range of tasks similar to human cognitive abilities
- These types of systems are theoretical and would require machines to obtain consciousness, self-awareness and emotional understanding.
Superintelligent A.I
- These system surpass human intelligence and are able to outperform humans when doing tasks.
- This is a speculative concept, not yet agreed between experts and usually only depicted in sci-fi media.
Machine Learning
Machine learning is the subset of artificial intelligence that focuses on creating systems to automatically learn and improve from experience without being explicitly programmed.
There four main categories of machine learning algorithms.
Supervised Learning
The model is trained on a labelled dataset, meaning that each training example is paired with an output label.
The goal of the model is to learning a mapping from inputs to outputs so that it can predict the label for new data.
Example A bank wants to develop a system to detect fraudulent credit card transaction to protect its customers from fraud.
The bank has a historical dataset of credit card transactions, where each instance in the dataset is labelled as either fraudulent or not fraudulent.
The input features of the dataset include the transaction amount, location of the transaction, customer's previous transaction data etc.
The model learns patterns and relationships between the input features and the labels.
Unsupervised Learning
The model is trained on a unlabelled dataset ,_ meaning that each training example does not have any output label associated with it.
The goal of the model is to infer the natural structure present within a set of data points.
Example An e-commerce website wants to understand its customer base better in order to create targeted marketing campaigns.
The website does not have labelled data, but has a database of customer information which includes a customer's purchase history, age, gender, location etc.
The goal of the model is to identify distinct groups (clusters) of customers based on the their purchasing and demographic information without prior labelling. These groups may be :
- High-value customers
- Impulse buyers
- Loyal customers
- Occasional customers
Semi-Supervised Learning
The model is trained on a small amount of labelled data and a large amount of unlabelled data for training.
The presence of labelled data helps to guide the model during the learning process.
Example A streaming platform wants to analyse consumer reactions on movies hosted on the platform.
Manually labelling a large volume of reaction as positive, negative or neutral is impractical and expensive.
The streaming platform creates a small dataset of labelled reactions and provides a large dataset of unlabelled reactions.
The goal of the model is to use the labelled and unlabelled datasets to accurately classify the sentiment towards a movie.
Reinforcement Learning
The model in concerned with training agents to make decisions by performing actions in an environment to maximise cumulative rewards.
Agents interact with the environment through trial and error, receiving feedback in the form of reward or punishment.
The goal is to develop a framework to map the state of the environment to actions that yield the highest cumulative reward over time.
Example An automotive company is developing a self-driving car that can navigate through city streets and various driving conditions safely and effectively.
- The self-driving car is the agent.
- The decisions on the car (stopping, accelerating) are the actions.
- The different driving scenarios are the states such as the current speed, distance to other vehicles etc.
- The roads, traffic lights, signs etc. make up the environment. The car starts by exploring different actions to see their effects, being punished when performing a wrong action - such as speeding in a residential area - and being rewarded when performing a right action - such as stopping at a right light.
Data Quality
Creating good machine learning models are dependent on reliable data.
Poor-quality data can arise from the following :
- Missing data from data entry errors or equipment malfunctions.
- Incorrect data from human error or data corruption.
- Inconsistent data coming from multiple sources with different units of measurements or conventions.
- Irrelevant data that does not contain useful information for the domain problem.
- Imbalanced data, which occurs when one class or category is significantly overrepresent compared to others in the dataset.
- Outliers which can distort the model's understanding of the data distribution leading to poor performance.
Bias
Bias : This refers to systematic errors or prejudices in data, algorithms or outcomes that lead to unfair or inaccurate results.
Bias can be reduced in the following ways :
- Ensure the training data is representative of the population and covers a wide range of groups and scenarios.
- Use statistical methods to detect and measure bias in data.
- Incorporate human oversight to ensure that A.I decisions are fair and ethical.
- Develop algorithms that are designed to minimise bias such as fairness-aware machine learning techniques.
Explainable Artificial Intelligence
Explainable A.I (XAI) refers to a set of techniques and methods that make the behaviour and predictions of machine learning model understandable and traceable to humans.
Intrinsic Interpretability refers to the inherent ability of a machine learning model to be understood and interpreted directly, without the need for additional techniques or tools.
Post-hoc Interpretability refers to techniques and methods used to explain and interpret the decisions of complex models after they have been trained. These models, such as deep neural networks, are not inherently interpretable, so additional tools are needed to understand their predictions.